Skip to content

Instantly share code, notes, and snippets.

@net8floz
net8floz / point_distance_squared.gml
Created January 26, 2018 22:14
Compare distances while avoiding square roots!
///@function point_distance_squared(x1, y1, x2, y2)
///@desc Compare distances while avoiding square roots! If you must compare
/// the result with a non squared value... simply square it!
/// if(point_distance_squared() > max * max){
///
/// }
///@param x1
///@param y1
///@param x2
///@param y2