fix(geometry/point): sqrt argument type from __float128 to long double
This commit is contained in:
parent
6ce8d08534
commit
b33b8ed3f4
|
@ -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); }
|
||||
|
|
Loading…
Reference in New Issue