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 void iterateAndApplyMethodBetweenTwoPoints(Vector2 pos1, Vector2 pos2, Supplier<FunctionInput> function) { | |
// If the two points are the same no need to iterate. Just run the provided function | |
if (pos1.epsilonEquals(pos2)) { | |
function.invoke(); | |
return; | |
} | |
int matrixX1 = pos1.x; | |
int matrixY1 = pos1.y; | |
int matrixX2 = pos2.x; |
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
#define MIN(a,b) ((a)<(b)?(a):(b)) | |
#define MAX(a,b) ((a)>(b)?(a):(b)) | |
typedef struct rgb { | |
float r, g, b; | |
} RGB; | |
typedef struct hsl { | |
float h, s, l; | |
} HSL; |