New Super Mario Bros. U Headers
Loading...
Searching...
No Matches
Angle.h
Go to the documentation of this file.
1#pragma once
2
3#include <basis/seadTypes.h>
4
5class Angle
6{
7public:
9 : mValue(0)
10 {
11 }
12
13 Angle(s32 value)
14 : mValue(value)
15 {
16 }
17
18 Angle(const Angle& other) = default;
19
20 operator s32() const
21 {
22 return mValue;
23 }
24
26 {
28 return *this;
29 }
30
32 {
33 mValue += rhs.mValue;
34 return *this;
35 }
36
38 {
39 mValue -= rhs.mValue;
40 return *this;
41 }
42
43 Angle operator+() const
44 {
45 return *this;
46 }
47
48 Angle operator-() const
49 {
50 return Angle(-mValue);
51 }
52
54 {
55 return mValue + rhs.mValue;
56 }
57
59 {
60 return mValue + rhs;
61 }
62
64 {
65 return mValue - rhs.mValue;
66 }
67
69 {
70 return mValue - rhs;
71 }
72
73 bool operator==(const Angle& rhs) const
74 {
75 return mValue == rhs.mValue;
76 }
77
78 bool operator==(s32 rhs) const
79 {
80 return mValue == rhs;
81 }
82
83 bool operator!=(const Angle& rhs) const
84 {
85 return mValue != rhs.mValue;
86 }
87
88 bool operator!=(s32 rhs) const
89 {
90 return mValue != rhs;
91 }
92
93public:
94 // Address: 0x029E0EA8
95 bool addCalcAngle(const Angle& target, f32 ratio, const Angle& max);
96 // Address: 0x029E0EE8
97 bool addCalcAngle(const Angle& target, f32 ratio, const Angle& max, const Angle& min);
98 // Address: 0x029E116C
99 bool chaseDecrease(const Angle& target, f32 ratio, const Angle& max, const Angle& min);
100 // Address: 0x029E117C
101 bool chaseRest(const Angle& target, const Angle& step);
102 // Address: 0x029E1188
103 bool chaseConstant(const Angle& target, const Angle& step);
104
105protected:
106 // Address: 0x029E0E34
107 bool addCalcAngle_(s32 target, s32 distance, f32 ratio, s32 max, s32 min);
108 // Address: 0x029E0F8C
109 bool chaseDecrease_(s32 target, f32 ratio, s32 max, s32 min);
110 // Address: 0x029E0DE8
111 bool chaseRest_(s32 target, s32 step);
112 // Address: 0x029E0F2C
113 bool chaseConstant_(s32 target, s32 step);
114
115protected:
117};
118static_assert(sizeof(Angle) == 4);
Definition Angle.h:6
bool chaseConstant_(s32 target, s32 step)
bool chaseDecrease_(s32 target, f32 ratio, s32 max, s32 min)
bool chaseRest_(s32 target, s32 step)
bool addCalcAngle_(s32 target, s32 distance, f32 ratio, s32 max, s32 min)
bool chaseRest(const Angle &target, const Angle &step)
s32 mValue
Definition Angle.h:116
Angle(const Angle &other)=default
bool chaseConstant(const Angle &target, const Angle &step)
bool addCalcAngle(const Angle &target, f32 ratio, const Angle &max, const Angle &min)
Angle()
Definition Angle.h:8
bool chaseDecrease(const Angle &target, f32 ratio, const Angle &max, const Angle &min)
Angle(s32 value)
Definition Angle.h:13