PixelCoord
alias PixelCoord = Tuple!(float, "x", float, "y")
1 // PixelCoord is dtiled's vector representation within pixel coordinate space.
2 static assert(isPixelCoord!PixelCoord);
3
4 // as a user, you may choose any (x,y) numeric pair to use as a pixel coordinate
5 struct MyVector(T) { T x, y; }
6
7 static assert(isPixelCoord!(MyVector!int));
8 static assert(isPixelCoord!(MyVector!uint));
9 static assert(isPixelCoord!(MyVector!float));
10 static assert(isPixelCoord!(MyVector!double));
11 static assert(isPixelCoord!(MyVector!real));
12
13 // To avoid confusion, grid coordinates are distinct from pixel coordinates
14 static assert(!isPixelCoord!RowCol);
Represents a location in continuous 2D space.