![]() |
cmdfx 0.2.1
Lightweight game engine for your terminal
|
A C++ wrapper around a CmdFX_Vector struct. More...
#include <util.hpp>
Public Member Functions | |
Vector (CmdFX_Vector *vector) | |
Vector (double x, double y) | |
CmdFX_Vector * | getVector () |
double | getX () const |
double | getY () const |
double | getMagnitude () const |
void | setX (double x) |
void | setY (double y) |
Vector | operator+ (const Vector &other) const |
Vector | operator+ (const std::vector< Vector > &vectors) const |
Vector & | operator+= (const Vector &other) |
Vector | operator- (const Vector &other) const |
Vector & | operator-= (const Vector &other) |
Vector | operator* (double scalar) const |
Vector & | operator*= (double scalar) |
Vector | operator/ (double scalar) const |
Vector & | operator/= (double scalar) |
int | rotate (double radians) |
double | getAngle () |
int | flipX () |
int | flipY () |
int | flip () |
int | dot (const Vector &other) const |
A C++ wrapper around a CmdFX_Vector struct.
This class is a wrapper around the CmdFX_Vector struct. It provides a constructor and destructor for the vector, as well as methods to get and set the vector's coordinates. The destructor will free the vector's memory when the object is destroyed.