Talk:GetDistance - ObjectReference
Revision as of 08:33, 28 May 2018 by imported>Rasikko
This function uses the Pythagorean Theorem based distance formula. The function most likely has to first convert the x and y positions to coordinates. Then adjust any negative coordinates to match up with their counterparts in the CK(in game they are offset by 1), and using the formula will lead to possibly calling Sqrt - Math, and calling Pow - Math twice, under the hood, making this a rather expensive function to use repeatedly. Having said that, while not totally necessary, you can code your own GetDistance function --Rasikko (talk) 2018-05-28T08:55:45 (EDT)