This library consists of a single proc: hypot(x, y).
It's often used to calculate the distance between points in 2D. That is, the straight Euclidean distance, rather than the "Chessboard" distance of get_dist() and bounds_dist(). Said another way, this computes the magnitude of your everyday 2D vector (x, y).
See here for more information:
https://en.wikipedia.org/wiki/Hypot
This is where the implementation comes from. Apparently, it's not as simple as
sqrt(x * x + y * y).
ID:2267834
Jul 9 2017, 10:00 pm
|
|