Vec2.InRadius

bool InRadius(Vec2 pt, float radius)

   
Vec2 pt The point to check against.
float radius The distance to check against.
RETURNS: bool True if the points are within radius of eachother, false not.

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

static bool InRadius(Vec2 a, Vec2 b, float radius)

   
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 eachother, false not.

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




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