3#include <lib/nw4r/math/vec.hpp>
14 return v < 0 ? -v : v;
19 float Math<float>::abs(
float v) {
23 typedef Math<float> Mathf;
36 void set(
float x,
float y) {
44 float getLength()
const {
return EGG::Mathf::sqrt(x * x + y * y); }
56 Vector3f(f32 fx, f32 fy, f32 fz) { set(fx, fy, fz); }
58 void set(
float x,
float y,
float z) {
Sphere3f(const Vector3f ¢er, float radius)
Constructs a sphere from a center and radius.
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.
A three-dimensional floating point vector.
Vector3f()
Constructs an empty vector.
Vector3f(f32 fx, f32 fy, f32 fz)
Constructs a vector from two floating point values.
double fabs(double x)
Returns the absolute value of x.
A three-dimensional floating point vector.