New Super Mario Bros. U Headers
Loading...
Searching...
No Matches
MathUtil.h
Go to the documentation of this file.
1#pragma once
2
3#include <math/seadMathCalcCommon.h>
4#include <math/seadVector.h>
5
7{
8 // NSMBW: sLib & dGameCom
9
10public:
11 template <typename T>
12 static T calcTimer(T* value);
13
14 static u32 absAngle(s32 value);
15
16 // Address: 0x029E11FC
17 static f32 addCalc(f32*, f32, f32, f32, f32);
18
19 // Address: 0x029E1718
20 static void getGlbPosToLyt(sead::Vector3f& pos);
21};
22
23template <typename T>
24T MathUtil::calcTimer(T* value)
25{
26 if (*value != 0)
27 (*value)--;
28 return *value;
29}
30
31inline u32 MathUtil::absAngle(s32 value)
32{
33 if (value >= 0)
34 return value;
35 else if (value == static_cast<s32>(-sead::Mathi::cHalfRoundIdx))
36 return sead::Mathu::cHalfRoundIdx;
37 else
38 return -value;
39}
Definition MathUtil.h:7
static u32 absAngle(s32 value)
Definition MathUtil.h:31
static f32 addCalc(f32 *, f32, f32, f32, f32)
static void getGlbPosToLyt(sead::Vector3f &pos)
static T calcTimer(T *value)
Definition MathUtil.h:24