diff options
| author | mat <git@matdoes.dev> | 2023-06-14 23:50:21 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-06-14 23:50:21 -0500 |
| commit | 804a9fd80084ead45c5b1b72fdb7c16e2f7ab712 (patch) | |
| tree | 6159ff1f0f25d6dca98fd67b70912a36742f7843 /azalea-core/src | |
| parent | dbfbffac140e722d57a1e18bcaa27b25f839f950 (diff) | |
| download | azalea-drasl-804a9fd80084ead45c5b1b72fdb7c16e2f7ab712.tar.xz | |
actually make Vec3::length sqrt
Diffstat (limited to 'azalea-core/src')
| -rwxr-xr-x | azalea-core/src/position.rs | 2 |
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. |
