Hypot

by Kaiochao
hypot(x, y) [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Kaiochao.Hypot##version=0

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://Kaiochao.Hypot##version=0

171 downloads
Latest Version
Date added: Jul 9 2017
Last updated: Jul 24 2017
0 fans
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).