Search in sources :

Example 16 with VNumber

use of org.diirt.vtype.VNumber in project yamcs-studio by yamcs.

the class StepFormulaFunction method calculate.

@Override
public Object calculate(final List<Object> args) {
    VNumber initialValue = (VNumber) args.get(0);
    VNumber increment = (VNumber) args.get(1);
    if (initialValue == null || increment == null) {
        return null;
    }
    return VTableFactory.step(initialValue.getValue().doubleValue(), increment.getValue().doubleValue());
}
Also used : VNumber(org.diirt.vtype.VNumber)

Aggregations

VNumber (org.diirt.vtype.VNumber)16 VNumberArray (org.diirt.vtype.VNumberArray)6 ArrayList (java.util.ArrayList)3 ValueFactory.newVNumberArray (org.diirt.vtype.ValueFactory.newVNumberArray)3 ListDouble (org.diirt.util.array.ListDouble)2 Display (org.diirt.vtype.Display)2 VStringArray (org.diirt.vtype.VStringArray)2 Instant (java.time.Instant)1 DesiredRateExpression (org.diirt.datasource.expression.DesiredRateExpression)1 Statistics (org.diirt.util.Statistics)1 ArrayDouble (org.diirt.util.array.ArrayDouble)1 VBoolean (org.diirt.vtype.VBoolean)1 VString (org.diirt.vtype.VString)1 ValueFactory.newDisplay (org.diirt.vtype.ValueFactory.newDisplay)1 ValueFactory.newVNumber (org.diirt.vtype.ValueFactory.newVNumber)1