Skip to content

Commit

Permalink
forgot some constexpr functions
Browse files Browse the repository at this point in the history
  • Loading branch information
altalk23 committed Sep 13, 2024
1 parent d7693ad commit a42b81a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions loader/include/Geode/cocos/cocoa/CCGeometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class CC_DLL CCPoint
@return float
@since v2.1.4
*/
inline constexpr float getDistance(const CCPoint& other) const {
inline float getDistance(const CCPoint& other) const {
return (*this - other).getLength();
};

Expand Down Expand Up @@ -255,7 +255,7 @@ class CC_DLL CCPoint
@return CCPoint
@since v2.1.4
*/
inline constexpr CCPoint normalize() const {
inline CCPoint normalize() const {
float length = getLength();
if(length == 0.) return CCPoint(1.f, 0);
return *this / getLength();
Expand All @@ -278,11 +278,11 @@ class CC_DLL CCPoint
@returns the rotated point
@since v2.1.4
*/
inline constexpr CCPoint rotateByAngle(const CCPoint& pivot, float angle) const {
inline CCPoint rotateByAngle(const CCPoint& pivot, float angle) const {
return pivot + (*this - pivot).rotate(CCPoint::forAngle(angle));
}

static inline constexpr CCPoint forAngle(const float a)
static inline CCPoint forAngle(const float a)
{
return CCPoint(cosf(a), sinf(a));
}
Expand Down

0 comments on commit a42b81a

Please sign in to comment.