assaultfish/engine/include/GearSrc/Math.h

35 lines
1.2 KiB
C
Raw Permalink Normal View History

2026-01-12 01:55:20 +09:00
#ifndef __GEARSRC_MATH_H__
#define __GEARSRC_MATH_H__
2026-01-12 01:54:35 +09:00
#include <GearSrc/MachDep.h>
#include <GearSrc/TypeDefs.h>
#ifdef __cplusplus
extern "C" {
#endif
#define GSMathPi 3.14159265358979323846
GSDECL void GSMathCross3(GSVector3 r, GSVector3 v0, GSVector3 v1);
2026-01-25 13:35:09 +09:00
GSDECL GSNumber GSMathInner3(GSVector3 v0, GSVector3 v1);
2026-01-12 01:54:35 +09:00
GSDECL void GSMathNormalize3(GSVector3 vec);
GSDECL void GSMathSubtract3(GSVector3 r, GSVector3 v0, GSVector3 v1);
GSDECL void GSMathAdd3(GSVector3 r, GSVector3 v0, GSVector3 v1);
2026-01-30 08:09:06 +09:00
GSDECL void GSMathNormalTriangle(GSVector3 r, GSVector3 v0, GSVector3 v1, GSVector3 v2);
GSDECL void GSMathNormalQuad(GSVector3 r, GSVector3 v0, GSVector3 v1, GSVector3 v2, GSVector3 v3);
2026-01-12 01:54:35 +09:00
GSDECL void GSMathInvert4x4(GSMatrix4x4 out, GSMatrix4x4 in);
2026-01-30 08:09:06 +09:00
GSDECL void GSMathRowToColumn4x4(GSMatrix4x4 out, GSMatrix4x4 in);
2026-01-30 08:44:11 +09:00
GSDECL void GSMathRowToColumn3x3(GSMatrix3x3 out, GSMatrix3x3 in);
GSDECL void GSMath3x3To4x4(GSMatrix4x4 out, GSMatrix3x3 in);
2026-01-12 01:54:35 +09:00
GSDECL GSNumber GSMathCot(GSNumber x);
2026-01-25 05:18:56 +09:00
GSDECL GSNumber GSMathClosestPOT(GSNumber x);
2026-01-30 23:07:23 +09:00
GSDECL GSNumber GSMathLength3(GSVector3 vec);
2026-01-12 01:54:35 +09:00
2026-01-30 08:09:06 +09:00
#define GSMathColumnToRow4x4 GSMathRowToColumn4x4
2026-01-30 08:44:11 +09:00
#define GSMathColumnToRow3x3 GSMathRowToColumn3x3
2026-01-30 08:09:06 +09:00
2026-01-12 01:54:35 +09:00
#ifdef __cplusplus
}
#endif
#endif