# Sqrt

Arithmetics
5.1 OC
int
int value Value of which you want to take the square root.
Returns the square root of the first parameter. If the parameter is less than 0, the result is 0.
global func ObjectDistance(obj1, obj2) { var dx = GetX(obj1) - GetX(obj2); var dy = GetY(obj1) - GetY(obj2); return(Sqrt(dx*dx+dy*dy)); }
Returns the distance between two objects. Notice there's also an engine function `ObjectDistance`.
Distance
ObjectDistance
Sven2
2001-11