Vec2

vec2 type with x and y values

Constructors

this
this(T px, T py)

initialises with an x and y value

Members

Functions

AngleTo
double AngleTo(Vec2!T to)

calculates the angle from this vec2 to another vec2

CastTo
Vec2!T2 CastTo()

casts the vec2 to the given type

DistanceTo
T DistanceTo(Vec2!T other)

returns the distance from this vec2 to another vec2

Equals
bool Equals(Vec2!T right)

checks if 2 vec2s have equal values

ToFloatVec
Vec2!float ToFloatVec()

casts the vec2 to a vec2 with float values

ToIntVec
Vec2!int ToIntVec()

casts the vec2 to a vec2 with int values

toString
string toString()

converts the vec2 to a string

Variables

x
T x;
y
T y;
Undocumented in source.

Meta