From 804a9fd80084ead45c5b1b72fdb7c16e2f7ab712 Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 14 Jun 2023 23:50:21 -0500 Subject: actually make Vec3::length sqrt --- azalea-core/src/position.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs index 6f17ec18..1e0c2ea5 100755 --- a/azalea-core/src/position.rs +++ b/azalea-core/src/position.rs @@ -135,7 +135,7 @@ impl Vec3 { /// Get the distance of this vector to the origin by doing /// `sqrt(x^2 + y^2 + z^2)`. pub fn length(&self) -> f64 { - self.x * self.x + self.y * self.y + self.z * self.z + f64::sqrt(self.x * self.x + self.y * self.y + self.z * self.z) } /// Get the squared distance from this position to another position. -- cgit v1.2.3