Vector2.opBinary - multiple declarations

Function Vector2.opBinary

Vector addition.

Vector2 opBinary(string op : "+")(
  Vector2 rhs
) const pure nothrow @nogc @safe;

Function Vector2.opBinary

Vector subtraction.

Vector2 opBinary(string op : "-")(
  Vector2 rhs
) const pure nothrow @nogc @safe;

Function Vector2.opBinary

Scales this vector.

auto opBinary(string op : "*", S)(
  S rhs
) const pure nothrow @nogc @safe
if (isGeoScalar!S && isGeoScalar!(typeof(T.init * S.init)));

The arithmetic result scalar becomes the result vector scalar.

Function Vector2.opBinary

Divides this vector by a scalar.

auto opBinary(string op : "/", S)(
  S rhs
) const pure nothrow @nogc @safe
if (isGeoScalar!S && isFloatingPoint!(typeof(T.init / S.init)));

Integer-result division is deliberately unavailable.