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

money.rave.common.backend.expression.operator.unary.Absolute.kt Maven / Gradle / Ivy

package money.rave.common.backend.expression

import money.rave.common.backend.expression.EvaluationContext
import money.rave.common.backend.expression.Expression
import money.rave.common.backend.scaledBigDecimal
import java.math.BigDecimal

class Absolute(
    child: Expression,
) : UnaryOperator(child) {

    override fun evaluate(context: EvaluationContext, candleIndex: Int): BigDecimal = child.evaluate(context, candleIndex).abs().scaledBigDecimal()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy