... have made also another function But I not understood how compile it #include "math.hbp" FUNCTION distance(n1, n2, n3) local nMin := math.min(n1, n2, n3) local nMax := math.max(n1, n2, n3) local nTemp := (nMax - nMin) % 90 nTemp := IIF(nTemp > 45, 90 - nTemp, nTemp) RETURN nTemp