 |
Rune Engine
Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
|
11 #ifndef VEC2_H_DEFINED
12 #define VEC2_H_DEFINED
27 Vec2(
double newX = 0,
double newY = 0);
47 Vec2& operator*=(
const double right);
51 bool operator==(
const Vec2& right);
53 bool operator!=(
const Vec2& right);
double x
X coordinate of the vector.
Definition: vec2.h:23
double y
Y coordinate of the vector.
Definition: vec2.h:25
RUNE_ENGINE std::ostream & operator<<(std::ostream &os, const rune::Vec2 &vector)
Stream operator overloading so that vectors can be printed to the console.
RUNE_ENGINE rune::Vec2 findNormal(rune::Vec2 const &axis)
Find a vector that is left handed normal to vector used to describe a surface.
RUNE_ENGINE double crossProduct(rune::Vec2 const &vec1, rune::Vec2 const &vec2)
Cross product calculation of two vectors.
1 x 2 vector to be used for math.
Definition: vec2.h:20
RUNE_ENGINE rune::Vec2 normalize(rune::Vec2 const &vec)
Divides each component of a vector by the vector magnitude to make the vector magnitude equal to 1.
RUNE_ENGINE double dotProduct(rune::Vec2 const &vector1, rune::Vec2 const &vector2)
Dot product calculation of two vectors.
RUNE_ENGINE Vec2 operator/(double scalar, Vec2 vec)
Overload of / operator for a scalar.
The main namespace to be used for interfacing with the engine.
Definition: animator.h:21
RUNE_ENGINE rune::Vec2 operator*(rune::Vec2 const &vec, rune::Mat2 &mat)
Overload of multiplication operator for a rune::Mat2.