![]() |
Blamite Game Engine - Strings
00402.09.29.23.0627.blamite
A library containing general purpose utilities and classes for use in multiple projects.
|
Structure representing a 2D vector. More...
#include <vector.h>
Public Member Functions | |
BlamVector2 () | |
BlamVector2 (float _x, float _y) | |
std::string | ToString () |
Converts the vector to a string, with each value separated by commas. More... | |
BlamVector2 | operator+ (const BlamVector2 &vector) |
Combines the values of two 2D vectors. More... | |
BlamVector2 | operator+ (const float &_float) |
Adds a float value to the X and Y values of the vector. More... | |
BlamVector2 | operator* (const BlamVector2 &vector) |
Multiplies the values of two 2D vectors. More... | |
BlamVector2 | operator* (const float &_float) |
Multiplies the X and Y values of the vector by a float value. More... | |
Public Attributes | |
float | x = 0.0f |
The X-coordinate of the 2D vector, representing horizontal position. More... | |
float | y = 0.0f |
The Y-coordinate of the 2D vector, representing vertical position. More... | |
Structure representing a 2D vector.
|
inline |
BlamVector2::BlamVector2 | ( | float | _x, |
float | _y | ||
) |
BlamVector2 BlamVector2::operator* | ( | const BlamVector2 & | vector | ) |
Multiplies the values of two 2D vectors.
vector | - The vector to multiply the current vector by. |
BlamVector2 BlamVector2::operator* | ( | const float & | _float | ) |
Multiplies the X and Y values of the vector by a float value.
_float | - The float value to multiply the vector values by. |
BlamVector2 BlamVector2::operator+ | ( | const BlamVector2 & | vector | ) |
Combines the values of two 2D vectors.
vector | - The vector to combine with the current vector. |
BlamVector2 BlamVector2::operator+ | ( | const float & | _float | ) |
Adds a float value to the X and Y values of the vector.
_float | - The float value to add to the vector. |
std::string BlamVector2::ToString | ( | ) |
Converts the vector to a string, with each value separated by commas.
x,y
format. float BlamVector2::x = 0.0f |
The X-coordinate of the 2D vector, representing horizontal position.
float BlamVector2::y = 0.0f |
The Y-coordinate of the 2D vector, representing vertical position.