Returns haversine(angle-in-radians). hav(x) == (1 - cos(x)) / 2 == sin(x / 2)^2.
static num hav(num x) => sin(x * 0.5) * sin(x * 0.5);