public class

FloatEvaluator

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

Class Overview

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

Summary

Public Constructors
FloatEvaluator(float startValue, float endValue)
Creates a new FloatEvaluator with the given startValue and endValue.
Public Methods
Float evaluate(float proportion)
Uses linear interpolation to find a Float 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 FloatEvaluator (float startValue, float endValue)

Creates a new FloatEvaluator 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 Float evaluate (float proportion)

Uses linear interpolation to find a Float 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