Hello, this is a preloaded function in the level clumsy circle:
function onCircle(unit, radius) {
var distance = hero.distanceTo(unit);
// We check the approximation.
var inaccuracy = 2;
var minDistance = radius - inaccuracy;
var maxDistance = radius + inaccuracy;
return distance <= maxDistance && distance >= minDistance;
}
what I’m not sure, is, I need to find the units that are NOT on the circle, and this function tells you which ones are on it. I’m just not sure how I an put this inside "IF"
I’m not sur I really understand what the functions returns when the soldier is on the line or when he’s not…