This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Trace code for UE4. Make sure you set a custom Object Channel (not Trace Channel) in the project settings under Engine - Collision. | |
| // Reboot UE4 to take effect if necessary. | |
| // Create a custom collision preset with Object Type set to your new channel. | |
| // In your code, the channel is referenced as ECC_GameTraceChannel[0-18]. Make #define to alias it. | |
| // Check Config/DefaultEngine.ini. Comparing different values and tests helped me a lot. | |
| // MSTJ. | |
| #define MyObjectChannel ECC_GameTraceChannel1 | |
| FCollisionQueryParams TraceParams(FName(TEXT("CameraPanHit")), true, nullptr); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| title=`youtube-dl --get-filename -o '%(title)s.%(ext)s' $1` | |
| youtube-dl -o - $1 > "$title" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| char* binaryArraySearch(char *haystack, size_t sizeOfHaystack, const char *needle, size_t sizeOfNeeddle) | |
| { | |
| for (size_t i = 0; i < sizeOfHaystack; i++) | |
| { | |
| if (haystack[i] != *needle) | |
| continue; | |
| bool pass = true; | |
| int keep = i; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Perlin { | |
| public int repeat; | |
| public Perlin(int repeat = -1) { | |
| this.repeat = repeat; | |
| } | |
| public double OctavePerlin(double x, double y, double z, int octaves, double persistence) { | |
| double total = 0; |