func MMIDistance(depth, magnitude, distance float64) float64 {
	// Minimum depth of 5 for numerical instability.
	d := math.Max(math.Abs(depth), 5.0)
	s := math.Hypot(d, distance)

	return math.Max(MMI(depth, magnitude)-1.18*math.Log(s/d)-0.0044*(s-d), -1.0)
}
// MMIDistance calculates the MMI at distance for New Zealand.  Distance and depth are in km.
MMIDistance calculates the MMI at distance for New Zealand.  Distance and depth are in km.
// MMIDistance calculates the MMI at distance for New Zealand . Distance and depth are in km .
func MMIDistance(depth, magnitude, distance float64) float64 {
	d := math.Max(math.Abs(depth), 5.0)
	s := math.Hypot(d, distance)
	return math.Max(MMI(depth, magnitude)-1.18*math.Log(s/d)-0.0044*(s-d), -1.0)
}
func MMIDistance ( depth , magnitude , distance float64 ) float64 { d := math . Max ( math . Abs ( depth ) , 5.0 ) s := math . Hypot ( d , distance ) return math . Max ( MMI ( depth , magnitude ) - 1.18 * math . Log ( s / d ) - 0.0044 * ( s - d ) , - 1.0 ) }
MMIDistance calculates the MMI at distance for New Zealand.
MMIDistance calculates the MMI at distance for New Zealand .
// Minimum depth of 5 for numerical instability.