1
0
Fork 0

fix(geometry/point): sqrt argument type from __float128 to long double

This commit is contained in:
arielherself 2025-01-06 16:41:48 +08:00
parent 6ce8d08534
commit b33b8ed3f4
Signed by: arielherself
SSH Key Fingerprint: SHA256:AK3cyo9tFsp7Mox7K0sYphleC8hReXhnRKxwuDT5LBc
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ template <typename T> struct point {
point(const T& x, const T& y) : x(x), y(y) {}
inline T square() const { return x * x + y * y; }
inline ld norm() const { return sqrt(ld(square())); }
inline ld norm() const { return sqrt((long double)(square())); }
inline point operator+(const point& rhs) const { return point(x + rhs.x, y + rhs.y); }
inline point operator-(const point& rhs) const { return point(x - rhs.x, y - rhs.y); }