diff options
| author | mat <git@matdoes.dev> | 2023-10-06 16:08:19 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-10-06 16:08:26 -0500 |
| commit | 94ef48d9f2e362167c077b9584e42ed2c71d679f (patch) | |
| tree | 1670cbdc946ce9574f20f6ed6a49e061394bf602 /azalea-core/src | |
| parent | 30702d94f65a2bd86c9ac0a7c402675b89ac4364 (diff) | |
| download | azalea-drasl-94ef48d9f2e362167c077b9584e42ed2c71d679f.tar.xz | |
make sure pathfinder is always centered on the destination block (fixes tests)
Diffstat (limited to 'azalea-core/src')
| -rwxr-xr-x | azalea-core/src/position.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs index 540419ba..630a3a55 100755 --- a/azalea-core/src/position.rs +++ b/azalea-core/src/position.rs @@ -39,6 +39,11 @@ macro_rules! vec3_impl { self.x * self.x + self.z * self.z } + #[inline] + pub fn horizontal_distance_to_sqr(&self, other: &Self) -> $type { + (self - other).horizontal_distance_sqr() + } + /// Return a new instance of this position with the y coordinate /// decreased by the given number. #[inline] |
