Posts: 352
Threads: 37
Joined: Jun 2012
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:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, Float:radius)
{
return VectorSize(x1-x2, y1-y2, z1-z2) <= radius*radius;
}
|
VectorSize takes the root of the distance so
radius shouldn't be multiplied.