The OpenD Programming Language

rectangle

Convenience function to create a Rectangle!int or Rectangle!double.

  1. auto rectangle(T x, T y, T width, T height)
  2. auto rectangle(Point!T point, T width, T height)
    rectangle
    (
    T
    )
    if (
    isOneOf!(T, int, double)
    )

Examples

auto a = rectangle(1, 1, 4, 4);
Rectangle!int rectInt = a;
auto b = rectangle(0.99, 0.99, 3.99, 3.99);
Rectangle!double rectDouble = b;

Meta