![]() |
Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <InputTranslator.h>
Static Public Member Functions | |
static CARDINAL_DIRECTION | VectorToCardinalDirection (float x, float y) |
Get the closest cardinal direction to the given vector. | |
static INTERCARDINAL_DIRECTION | VectorToIntercardinalDirection (float x, float y) |
Get the closest cardinal or intercardinal direction to the given vector. | |
|
static |
Get the closest cardinal direction to the given vector.
This function assumes a right-handed cartesian coordinate system; positive X is right, positive Y is up.
Ties are resolved in the clockwise direction: (0.5, 0.5) will resolve to RIGHT.
x | The x component of the vector |
y | The y component of the vector |
|
static |
Get the closest cardinal or intercardinal direction to the given vector.
This function assumes a right-handed cartesian coordinate system; positive X is right, positive Y is up.
Ties are resolved in the clockwise direction.
x | The x component of the vector |
y | The y component of the vector |