inline les fonctions opérateurs hors classes
This commit is contained in:
@@ -15,14 +15,14 @@ enum Rotation {
|
||||
/**
|
||||
* Addition operator, returns a rotation corresponding to doing both rotations
|
||||
*/
|
||||
Rotation operator+(const Rotation& left, const Rotation& right) {
|
||||
inline Rotation operator+(const Rotation& left, const Rotation& right) {
|
||||
return Rotation((left + right) % 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* Additive assignation operator, rotate the left rotation by the right rotation
|
||||
*/
|
||||
Rotation& operator+=(Rotation& left, const Rotation& right) {
|
||||
inline Rotation& operator+=(Rotation& left, const Rotation& right) {
|
||||
left = left + right;
|
||||
return left;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user