Loading...
Searching...
No Matches
vector.h File Reference

Vector struct and related functions. More...

`#include "math/const.h"`
`#include "math/func.h"`
`#include <cmath>`
`#include <sstream>`
Include dependency graph for vector.h:

## Classes

struct | Math::Vector
| 3D (3x1) vector More...

## Namespaces

namespace | Math
| Namespace for (new) math code.

## Functions

bool | Math::VectorsEqual (const Math::Vector &a, const Math::Vector &b, float tolerance=TOLERANCE)
| Checks if two vectors are equal within given tolerance.
Vector | Math::Normalize (const Math::Vector &v)
| Convenience function for getting normalized vector.
float | Math::DotProduct (const Math::Vector &left, const Math::Vector &right)
| Convenience function for calculating dot product.
Vector | Math::CrossProduct (const Math::Vector &left, const Math::Vector &right)
| Convenience function for calculating cross product.
float | Math::Angle (const Math::Vector &a, const Math::Vector &b)
| Convenience function for calculating angle (in radians) between two vectors.
float | Math::Distance (const Math::Vector &a, const Math::Vector &b)
| Returns the distance between the ends of two vectors.
float | Math::DistanceSquared (const Math::Vector &a, const Math::Vector &b)
| Returns the squared distance between the ends of two vectors.
Vector | Math::Clamp (const Vector &vec, const Vector &min, const Vector &max)
| Clamps the vector vec to range between min and max.

## Detailed Description

Vector struct and related functions.