diff options
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 { |
