public class

DoubleEvaluator

extends Object
implements Evaluator<T>
java.lang.Object
   ↳ com.shinobicontrols.charts.DoubleEvaluator

Class Overview

Uses linear interpolation to find a Double value based on a given proportion and the specified startValue and endValue.

Summary

Public Constructors
DoubleEvaluator(double startValue, double endValue)
Creates a new DoubleEvaluator with the given startValue and endValue.
Public Methods
Double evaluate(float proportion)
Uses linear interpolation to find a Double value based on the given proportion and the specified startValue and endValue.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.shinobicontrols.charts.Evaluator

Public Constructors

public DoubleEvaluator (double startValue, double endValue)

Creates a new DoubleEvaluator with the given startValue and endValue.

Parameters
startValue the evaluated value for a proportion of 0.0
endValue the evaluated value for a proportion of 1.0

Public Methods

public Double evaluate (float proportion)

Uses linear interpolation to find a Double value based on the given proportion and the specified startValue and endValue.

A proportion of 0.0 will return startValue while a proportion of 1.0 will return endValue. It is possible for proportion to be less than 0.0 or greater than 1.0 and therefore the evaluated value may be less than the startValue or greater than the endValue.

Parameters
proportion the proportion of the animated quantity
Returns
  • the value of the animated quantity based on the startValue and endValue at a certain proportion