All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.Operators.kt Maven / Gradle / Ivy

There is a newer version: 0.4.5-alpha6
Show newest version
package org.openrndr.kartifex

typealias DoubleUnaryOperator = (Double) -> Double
typealias DoublePredicate = (Double) -> Boolean
typealias DoubleBinaryOperator = (Double, Double) -> Double

fun signum(d: Double): Double {
    return if (d == 0.0 || d.isNaN()) d else if (d < 0) -1.0 else 1.0
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy