The OpenD Programming Language

Size

A simple struct representing a size with only int or double values

struct Size (
T
) if (
is(T == int) ||
is(T == double)
) {}

Constructors

this
this(T width, T height)
height
T height;

Members

Variables

width
T width;

Examples

auto a = Size!int(10, 10);
auto a2 = size(10, 10);
auto b = Size!double(5, 5);
auto b2 = size(5.0, 5.0);
assert(a == a2);
assert(b == b2);

Meta