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

ru.hnau.jutils.producer.extensions.float.producerExtensionsFloatWithDouble.kt Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
package ru.hnau.jutils.producer.extensions.float

import ru.hnau.jutils.producer.Producer


operator fun Producer.plus(other: Double) = map { it + other }
operator fun Producer.minus(other: Double) = map { it - other }
operator fun Producer.times(other: Double) = map { it * other }
operator fun Producer.div(other: Double) = map { it / other }
operator fun Producer.rem(other: Double) = map { it % other }

operator fun Producer.plus(other: Producer) = combineWith(other, Float::plus)
operator fun Producer.minus(other: Producer) = combineWith(other, Float::minus)
operator fun Producer.times(other: Producer) = combineWith(other, Float::times)
operator fun Producer.div(other: Producer) = combineWith(other, Float::div)
operator fun Producer.rem(other: Producer) = combineWith(other, Float::rem)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy