@@ -21,167 +21,168 @@ struct _vector3
2121 ICF T& operator [](int i) { return *((T*)this + i); }
2222 ICF T& operator [](int i) const { return *((T*)this + i); }
2323
24- ICF SelfRef set (T _x, T _y, T _z)
24+ ICF SelfRef set (T _x, T _y, T _z) noexcept
2525 {
2626 x = _x;
2727 y = _y;
2828 z = _z;
2929 return *this ;
3030 }
3131
32- ICF SelfRef set (const _vector3<float >& v)
32+ ICF SelfRef set (const _vector3<float >& v) noexcept
3333 {
3434 x = T (v.x );
3535 y = T (v.y );
3636 z = T (v.z );
3737 return *this ;
3838 }
3939
40- ICF SelfRef set (const _vector3<double >& v)
40+ ICF SelfRef set (const _vector3<double >& v) noexcept
4141 {
4242 x = T (v.x );
4343 y = T (v.y );
4444 z = T (v.z );
4545 return *this ;
4646 }
4747
48- ICF SelfRef set (float * p)
48+ ICF SelfRef set (float * p) noexcept
4949 {
5050 x = p[0 ];
5151 y = p[1 ];
5252 z = p[2 ];
5353 return *this ;
5454 }
5555
56- ICF SelfRef set (double * p)
56+ ICF SelfRef set (double * p) noexcept
5757 {
5858 x = p[0 ];
5959 y = p[1 ];
6060 z = p[2 ];
6161 return *this ;
6262 }
6363
64- ICF SelfRef add (const Self& v)
64+ // XXX: The vast majority of these basic math operations can be expressed as non-class functions.
65+ ICF SelfRef add (const Self& v) noexcept
6566 {
6667 x += v.x ;
6768 y += v.y ;
6869 z += v.z ;
6970 return *this ;
7071 }
7172
72- ICF SelfRef add (T s)
73+ ICF SelfRef add (T s) noexcept
7374 {
7475 x += s;
7576 y += s;
7677 z += s;
7778 return *this ;
7879 }
7980
80- ICF SelfRef add (const Self& a, const Self& v)
81+ ICF SelfRef add (const Self& a, const Self& v) noexcept
8182 {
8283 x = a.x + v.x ;
8384 y = a.y + v.y ;
8485 z = a.z + v.z ;
8586 return *this ;
8687 }
8788
88- ICF SelfRef add (const Self& a, T s)
89+ ICF SelfRef add (const Self& a, T s) noexcept
8990 {
9091 x = a.x + s;
9192 y = a.y + s;
9293 z = a.z + s;
9394 return *this ;
9495 }
9596
96- ICF SelfRef sub (const Self& v)
97+ ICF SelfRef sub (const Self& v) noexcept
9798 {
9899 x -= v.x ;
99100 y -= v.y ;
100101 z -= v.z ;
101102 return *this ;
102103 }
103104
104- ICF SelfRef sub (T s)
105+ ICF SelfRef sub (T s) noexcept
105106 {
106107 x -= s;
107108 y -= s;
108109 z -= s;
109110 return *this ;
110111 }
111112
112- ICF SelfRef sub (const Self& a, const Self& v)
113+ ICF SelfRef sub (const Self& a, const Self& v) noexcept
113114 {
114115 x = a.x - v.x ;
115116 y = a.y - v.y ;
116117 z = a.z - v.z ;
117118 return *this ;
118119 }
119120
120- ICF SelfRef sub (const Self& a, T s)
121+ ICF SelfRef sub (const Self& a, T s) noexcept
121122 {
122123 x = a.x - s;
123124 y = a.y - s;
124125 z = a.z - s;
125126 return *this ;
126127 }
127128
128- ICF SelfRef mul (const Self& v)
129+ ICF SelfRef mul (const Self& v) noexcept
129130 {
130131 x *= v.x ;
131132 y *= v.y ;
132133 z *= v.z ;
133134 return *this ;
134135 }
135136
136- ICF SelfRef mul (T s)
137+ ICF SelfRef mul (T s) noexcept
137138 {
138139 x *= s;
139140 y *= s;
140141 z *= s;
141142 return *this ;
142143 }
143144
144- ICF SelfRef mul (const Self& a, const Self& v)
145+ ICF SelfRef mul (const Self& a, const Self& v) noexcept
145146 {
146147 x = a.x * v.x ;
147148 y = a.y * v.y ;
148149 z = a.z * v.z ;
149150 return *this ;
150151 }
151152
152- ICF SelfRef mul (const Self& a, T s)
153+ ICF SelfRef mul (const Self& a, T s) noexcept
153154 {
154155 x = a.x * s;
155156 y = a.y * s;
156157 z = a.z * s;
157158 return *this ;
158159 }
159160
160- ICF SelfRef div (const Self& v)
161+ ICF SelfRef div (const Self& v) noexcept
161162 {
162163 x /= v.x ;
163164 y /= v.y ;
164165 z /= v.z ;
165166 return *this ;
166167 }
167168
168- ICF SelfRef div (T s)
169+ ICF SelfRef div (T s) noexcept
169170 {
170171 x /= s;
171172 y /= s;
172173 z /= s;
173174 return *this ;
174175 }
175176
176- ICF SelfRef div (const Self& a, const Self& v)
177+ ICF SelfRef div (const Self& a, const Self& v) noexcept
177178 {
178179 x = a.x / v.x ;
179180 y = a.y / v.y ;
180181 z = a.z / v.z ;
181182 return *this ;
182183 }
183184
184- ICF SelfRef div (const Self& a, T s)
185+ ICF SelfRef div (const Self& a, T s) noexcept
185186 {
186187 x = a.x / s;
187188 y = a.y / s;
0 commit comments