Vec2.InRadius

bool InRadius(Vec2 pt, float radius)

Checks if a point is within a certain radius of this one. This is an easily readable shorthand of the squared distance check.

   
Vec2 pt The point to check against.
float radius The distance to check against.
RETURNS: bool True if the points are within radius of each other, false not.
static bool InRadius(Vec2 a, Vec2 b, float radius)

Checks if two points are within a certain radius of each other. This is an easily readable shorthand of the squared distance check.

   
Vec2 a The first point.
Vec2 b And the second point!
float radius The distance to check against.
RETURNS: bool True if a and b are within radius of each other, false if not.




Found an issue with these docs, or have some additional questions? Create an Issue on Github!