hav static method

num hav(
  1. num x
)

Returns haversine(angle-in-radians).

hav(x) == (1 - cos(x)) / 2 == sin(x / 2)^2.

Implementation

static num hav(num x) => pow(sin(x * 0.5), 2);