aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-08-25 04:44:20 -0500
committermat <git@matdoes.dev>2023-08-25 04:44:20 -0500
commit32eece4d376263fd48c03d7a25c36c87072f8987 (patch)
treeffaa78bf05d8fe1d83dc92e7fbb78bfaafc5d97e /azalea-core/src
parent7df2256f35fdf6925e2499966774d3a9a861e69c (diff)
downloadazalea-drasl-32eece4d376263fd48c03d7a25c36c87072f8987.tar.xz
implement stepping up stairs
Diffstat (limited to 'azalea-core/src')
-rwxr-xr-xazalea-core/src/position.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs
index 77dc256a..eb6bcd89 100755
--- a/azalea-core/src/position.rs
+++ b/azalea-core/src/position.rs
@@ -24,6 +24,10 @@ macro_rules! vec3_impl {
(self - other).length_sqr()
}
+ pub fn horizontal_distance_sqr(&self) -> $type {
+ self.x * self.x + self.z * self.z
+ }
+
/// Return a new instance of this position with the y coordinate
/// decreased by the given number.
pub fn down(&self, y: $type) -> Self {