This file contains 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
#include "hemicube.h" | |
#define PACK_HEMICUBES 1 | |
static void get_hemicube_face_normal(int index, Vector3 *forward, Vector3 *left, Vector3 *up) { | |
// Unwrapped hemicube with positive-Z in the middle. | |
switch (index) { | |
case 0: *forward = Vector3(+1, 0, 0); *left = Vector3( 0, 1, 0); break; |
This file contains 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
/** | |
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex") | |
* | |
* More language ports, as well as legacy 2014 OpenSimplex, can be found here: | |
* https://github.com/KdotJPG/OpenSimplex2 | |
*/ | |
public class OpenSimplex2S { | |
private static final long PRIME_X = 0x5205402B9270C86FL; |
This file contains 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
#include <stdio.h> | |
typedef struct point { | |
int x, y; | |
} point; | |
typedef struct point3d { | |
struct point; | |
int z; | |
} point3d; |
This file contains 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
/* | |
clang++-3.6 -DVARIADIC_WRAPPER -O3 -Wall -Wpedantic -std=c++11 variadic.cpp | |
./a.out | |
objdump -j .rodata -j .text -d -S a.out > a.txt | |
clang++-3.6 -O3 -Wall -Wpedantic -std=c++11 variadic.cpp | |
./a.out | |
objdump -j .rodata -j .text -d -S a.out > b.txt |
Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.