diff options
| author | aura <nw@moneybot.cc> | 2026-02-17 23:42:09 +0100 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-02-17 23:42:09 +0100 |
| commit | 5e2eb7d67ae933b7566f1944d0bb7744da03d586 (patch) | |
| tree | 054acff1113270a9cd07933df760f3768c1b6853 /sourcemod/scripting/include/gamechaos/vectors.inc | |
| parent | 341db13a008dc12bb22ceb50452d93d01476308c (diff) | |
move source stuff to its own folder
Diffstat (limited to 'sourcemod/scripting/include/gamechaos/vectors.inc')
| -rw-r--r-- | sourcemod/scripting/include/gamechaos/vectors.inc | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/sourcemod/scripting/include/gamechaos/vectors.inc b/sourcemod/scripting/include/gamechaos/vectors.inc deleted file mode 100644 index 79d5e8f..0000000 --- a/sourcemod/scripting/include/gamechaos/vectors.inc +++ /dev/null @@ -1,66 +0,0 @@ - -#if defined _gamechaos_stocks_vectors_included - #endinput -#endif -#define _gamechaos_stocks_vectors_included - -#define GC_VECTORS_VERSION 0x01_00_01 -#define GC_VECTORS_VERSION_STRING "1.0.1" - -/** - * Calculates the horizontal (x, y) length of a vector. - * - * @param vec Vector. - * @return Vector length (magnitude). - */ -stock float GCGetVectorLength2D(const float vec[3]) -{ - float tempVec[3]; - tempVec = vec; - tempVec[2] = 0.0; - - return GetVectorLength(tempVec); -} - -/** - * Calculates the horizontal (x, y) distance between 2 vectors. - * - * @param x Vector 1. - * @param y Vector 2. - * @param tolerance How close the floats have to be to return true. - * @return True on success, false otherwise. - */ -stock float GCGetVectorDistance2D(const float x[3], const float y[3]) -{ - float x2[3]; - float y2[3]; - - x2 = x; - y2 = y; - - x2[2] = 0.0; - y2[2] = 0.0; - - return GetVectorDistance(x2, y2); -} - -/** - * Checks if 2 vectors are exactly equal. - * - * @param a Vector 1. - * @param b Vector 2. - * @return True on success, false otherwise. - */ -stock bool GCVectorsEqual(const float a[3], const float b[3]) -{ - bool result = true; - for (int i = 0; i < 3; i++) - { - if (a[i] != b[i]) - { - result = false; - break; - } - } - return result; -}
\ No newline at end of file |
