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
6{
7 // NSMBW: sLib & dGameCom
8
9public:
10 template <typename T>
11 static T calcTimer(T* value);
12
13 static u32 absAngle(s32 value);
14
15 // Address: 0x029E11FC
16 static f32 addCalc(f32*, f32, f32, f32, f32);
17
18 // Address: 0x029E1718
19 static void getGlbPosToLyt(sead::Vector3f& pos);
20};
21
22template <typename T>
23T MathUtil::calcTimer(T* value)
24{
25 if (*value != 0)
26 (*value)--;
27 return *value;
28}
29
30inline u32 MathUtil::absAngle(s32 value)
31{
32 if (value >= 0)
33 return value;
34 else if (value == -sead::Mathi::cHalfRoundIdx)
35 return sead::Mathu::cHalfRoundIdx;
36 else
37 return -value;
38}
Definition MathUtil.h:6
static u32 absAngle(s32 value)
Definition MathUtil.h:30
static f32 addCalc(f32 *, f32, f32, f32, f32)
static void getGlbPosToLyt(sead::Vector3f &pos)
static T calcTimer(T *value)
Definition MathUtil.h:23