io.virtdata.conversions.from_double.ToFloat Maven / Gradle / Ivy
package io.virtdata.conversions.from_double;
import io.virtdata.annotations.ThreadSafeMapper;
import java.util.function.DoubleFunction;
@ThreadSafeMapper
public class ToFloat implements DoubleFunction {
private final double scale;
public ToFloat(double scale) {
this.scale = scale;
}
public ToFloat() {
this.scale = Float.MAX_VALUE;
}
@Override
public Float apply(double input) {
return (float) (input % scale);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy