Class ConstantFunction

  • All Implemented Interfaces:
    Function

    public class ConstantFunction
    extends Object
    implements Function
    Represents a constant motion that is always at the stop value.
    • Field Detail

      • INSTANCE

        public static final ConstantFunction INSTANCE
        Singleton to avoid creating several instances.
    • Method Detail

      • computeValue

        public float computeValue​(float t)
        Description copied from interface: Function
        Returns the value of the function for the given time factor.
        Specified by:
        computeValue in interface Function
        Parameters:
        t - the time factor, between 0 and 1.
        Returns:
        the value of the function for the given time, between 0 and 1.