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
///////////////////////////////////////////////////////////////////////////// | |
// int2 is similar to Vector2, but with integers instead of floats | |
// Useful for various grid related things. | |
// | |
// - Swizzle operators xx/xy/yx/yy | |
// - Extended arithmetic operators similar to shader data types | |
// A few examples: | |
// int2(8,4) / int2(2,4) -> int2(4,1) | |
// 16 / int2(2,4) -> int2(8,4) | |
// int2(2,3) * int2(4,5) -> int2(8,15) |