A Vec2 is an immutable object that represents a 2D Vector.
More...
#include <attitude-utils.hpp>
|
decimal | x |
| The x coordinate.
|
|
decimal | y |
| The y coordinate.
|
|
A Vec2 is an immutable object that represents a 2D Vector.
◆ Magnitude()
decimal found::Vec2::Magnitude |
( |
| ) |
const |
Provides the magnitude of this Vec2.
- Returns
- The magnitude of this
◆ MagnitudeSq()
decimal found::Vec2::MagnitudeSq |
( |
| ) |
const |
Provides the square of the magnitude of this Vec2.
- Returns
- The square of the magnitude of this
◆ Normalize()
Vec2 found::Vec2::Normalize |
( |
| ) |
const |
Normalizes this.
- Returns
- The normalized vector of this
◆ operator*() [1/2]
Vec2 found::Vec2::operator* |
( |
const decimal & |
scalar | ) |
const |
Scalar-vector Product.
- Parameters
-
- Returns
- scalar * this
◆ operator*() [2/2]
decimal found::Vec2::operator* |
( |
const Vec2 & |
other | ) |
const |
Dot product (Scalar product)
- Parameters
-
- Returns
- The dot of this and other
◆ operator+()
Vec2 found::Vec2::operator+ |
( |
const Vec2 & |
other | ) |
const |
Vector Addition.
- Parameters
-
- Returns
- this + other
◆ operator-()
Vec2 found::Vec2::operator- |
( |
const Vec2 & |
other | ) |
const |
Vector Subtraction.
- Parameters
-
- Returns
- this - other
The documentation for this struct was generated from the following files: