aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xazalea-core/src/position.rs2
1 files changed, 1 insertions, 1 deletions
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.