extension Double { func rounded(to interval: Double) -> Double { (self / interval).rounded() * interval } }