diff options
| author | mat <git@matdoes.dev> | 2023-08-25 04:44:20 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-08-25 04:44:20 -0500 |
| commit | 32eece4d376263fd48c03d7a25c36c87072f8987 (patch) | |
| tree | ffaa78bf05d8fe1d83dc92e7fbb78bfaafc5d97e /azalea-core/src | |
| parent | 7df2256f35fdf6925e2499966774d3a9a861e69c (diff) | |
| download | azalea-drasl-32eece4d376263fd48c03d7a25c36c87072f8987.tar.xz | |
implement stepping up stairs
Diffstat (limited to 'azalea-core/src')
| -rwxr-xr-x | azalea-core/src/position.rs | 4 |
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 { |
