From b33b8ed3f4e64e62b354eb3acf0f92ec93a41f75 Mon Sep 17 00:00:00 2001 From: arielherself Date: Mon, 6 Jan 2025 16:41:48 +0800 Subject: [PATCH] fix(geometry/point): sqrt argument type from __float128 to long double --- geometry/point.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geometry/point.cc b/geometry/point.cc index 68df850..d57e6e2 100644 --- a/geometry/point.cc +++ b/geometry/point.cc @@ -5,7 +5,7 @@ template 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); }