Point

A simple struct to store the coordinates of a point as doubles or integers.

struct Point (
T
) if (
isOneOf!(T, int, double)
) {}

Constructors

this
this(T x, T y)

Members

Variables

x
T x;
y
T y;

Examples

auto p = Point!double(10, 10);  //Type Point!double
auto p2 = point(10.0, 10.0);    //Type Point!double
auto p3 = Point!int(10, 10);    //Type Point!int
auto p4 = point(10, 10);        //Type Point!int
assert(p == p2);
assert(p3 == p4);

Meta