2D Vector
Type: Value type
| Declaration | Description |
|---|---|
| void Vector2D() | Default constructs a 2D vector (0, 0) |
| void Vector2D(const Vector2D& in other) | Copy constructs a 2D vector |
| void Vector2D(float x, float y) | Constructs a 2D vector from 2 floats |
| Vector2D& opAssign(const Vector2D& in other) | Assign vector |
| Vector2D opAdd(const Vector2D& in other) const | Add vectors |
| Vector2D opSub(const Vector2D& in other) const | Subtract vectors |
| Vector2D opMul(float fl) const | Multiply vector by a value |
| Vector2D opMul_r(float fl) const | Multiply vector by a value |
| Vector2D opDiv(float fl) const | Divide vector by a value |
| Vector2D opDiv_r(float fl) const | Divide vector by a value |
| bool opEquals(const Vector2D& in other) const | Compare vectors |
| float Length() const | Gets the length of this vector |
| Vector2D Normalize() const | Returns the normalized form of this vector |
| string ToString() const | Returns a string representation of this vector |
| Declaration | Description |
|---|---|
| float x | Vector2D x variable |
| float y | Vector2D y variable |