3#include <lib/nw4r/math/vec.hpp>
14 return v < 0 ? -v : v;
23 typedef Math<float> Mathf;
39 void set(
float x,
float y) {
47 float getLength()
const {
return EGG::Mathf::sqrt(x * x + y * y); }
A two-dimensional floating point vector.
Vector2f()
Constructs an empty vector.
float getLength() const
Gets the length of the vector.
Vector2f(f32 fx, f32 fy)
Constructs a vector from two floating point values.
Vector2f(const Vector2f &v)
Constructs a new vector from an existing vector.
double fabs(double x)
Returns the absolute value of x.