gibbsly / gm

A utility datapack for doing math operations
The Unlicense
33 stars 2 forks source link

suggestion: distance2 operator #14

Closed DoctorBracewell closed 2 months ago

DoctorBracewell commented 3 months ago

Pretty simple, just a gm:distance operator but doesn't find the square root of the distance. basically just returns x^2 + y^2 to reduce computation when you don't need the actual distance in e.g. comparisons.

gibbsly commented 2 months ago

the distance calculation uses a single display entity transform to calculate, doing a "simplified" distance calculation would require 6 display entity transform calculations.