Public Member Functions | |
Vector2i () | |
Constructor initializes vector with (0,0). | |
Vector2i (int x, int y) | |
Constructor initializes vector with given values. | |
Static Public Member Functions | |
static Vector2i | operator+ (Vector2i lhs, Vector2i rhs) |
Calculates the sum of two vectors. | |
static Vector2i | operator- (Vector2i lhs, Vector2i rhs) |
Calculates the difference of two vectors. | |
static Vector2i | operator- (Vector2i v) |
Negates the passed vector (invert the sign of all coordinates). | |
static Vector2i | operator * (Vector2i lhs, int rhs) |
Multiplicates a vector with a scalar. | |
static Vector2i | operator/ (Vector2i lhs, int rhs) |
Divides a vector by a scalar. Only integer division is done. | |
static Vector2i | operator * (Vector2i lhs, float rhs) |
Multiplicates a vector with a scalar. Result is clamped to integer values. | |
static Vector2i | operator/ (Vector2i lhs, float rhs) |
Divides a vector by a scalar. Division is done with floating point precision, the result is casted to an integer. | |
Properties | |
int | X [get, set] |
x coordinate of the vector | |
int | Y [get, set] |
y coordinate of the vector |
FlowVis.Math.Vector2i.Vector2i | ( | ) |
Constructor initializes vector with (0,0).
FlowVis.Math.Vector2i.Vector2i | ( | int | x, | |
int | y | |||
) |
Constructor initializes vector with given values.
x | X-coordinate of vector | |
y | Y-coordinate of vector |
Calculates the sum of two vectors.
lhs | left-hand operator of addition | |
rhs | right-hand operator of addition |
Calculates the difference of two vectors.
lhs | left-hand operator of subtraction | |
rhs | right-hand operator of subtraction |
Negates the passed vector (invert the sign of all coordinates).
v | the vector for which the negative is created |
Multiplicates a vector with a scalar.
lhs | left-hand operator of multiplication | |
rhs | right-hand operator of multiplication |
Divides a vector by a scalar. Only integer division is done.
lhs | left hand operator of division | |
rhs | right hand operator of division |
Multiplicates a vector with a scalar. Result is clamped to integer values.
lhs | lefth hand operator of multiplication | |
rhs | right hand operator of multiplication |
Divides a vector by a scalar. Division is done with floating point precision, the result is casted to an integer.
lhs | left-hand operator of multiplication | |
rhs | right-hand operator of multiplication |
int FlowVis.Math.Vector2i.X [get, set] |
x coordinate of the vector
int FlowVis.Math.Vector2i.Y [get, set] |
y coordinate of the vector