From a42b81ae5e0ef357a40481d18bdd316f1264d3c8 Mon Sep 17 00:00:00 2001 From: altalk23 <45172705+altalk23@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:42:45 +0300 Subject: [PATCH] forgot some constexpr functions --- loader/include/Geode/cocos/cocoa/CCGeometry.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/loader/include/Geode/cocos/cocoa/CCGeometry.h b/loader/include/Geode/cocos/cocoa/CCGeometry.h index 21b216e92..de8a86c24 100644 --- a/loader/include/Geode/cocos/cocoa/CCGeometry.h +++ b/loader/include/Geode/cocos/cocoa/CCGeometry.h @@ -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(); }; @@ -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(); @@ -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)); }