[Include] Little Unneeded Functions
#11

Quote:
Originally Posted by Kaliber
Посмотреть сообщение
There is even a function you could use, that would be even faster and simpler xD

PHP код:
stock bool:IsCoordNearCoord(Float:x1Float:y1Float:z1Float:x2Float:y2Float:z2Float:radius)
{
    return 
VectorSize(x1-x2y1-y2z1-z2) <= radius*radius;

VectorSize takes the root of the distance so radius shouldn't be multiplied.
Reply


Messages In This Thread
Little Unneeded Functions - by antixgaming - 22.03.2019, 17:32
Re: Little Unneeded Functions - by antixgaming - 22.03.2019, 21:09
Re: Little Unneeded Functions - by antixgaming - 22.03.2019, 21:42
Re: Little Unneeded Functions - by antixgaming - 22.03.2019, 21:45
Re: Little Unneeded Functions - by antixgaming - 22.03.2019, 22:01
Re: Little Unneeded Functions - by antixgaming - 22.03.2019, 22:21
Re: Little Unneeded Functions - by antixgaming - 22.03.2019, 22:24
Re: Little Unneeded Functions - by Y_Less - 22.03.2019, 22:45
Re: Little Unneeded Functions - by iLearner - 22.03.2019, 23:04
Re: Little Unneeded Functions - by Kaliber - 22.03.2019, 23:24
Re: Little Unneeded Functions - by kristo - 22.03.2019, 23:29

Forum Jump:


Users browsing this thread: 3 Guest(s)