Class TriGeoUtils

java.lang.Object
dev.oxydien.mathimations.utils.TriGeoUtils

public class TriGeoUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static float
    cosValue(float curMs, float min, float max, float period)
    Maps a cosine wave to a value between min and max over a given period.
    static float
    sinValue(float curMs, float min, float max, float period)
    Maps a sine wave to a value between min and max over a given period.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TriGeoUtils

      public TriGeoUtils()
  • Method Details

    • sinValue

      public static float sinValue(float curMs, float min, float max, float period)
      Maps a sine wave to a value between min and max over a given period.
      Parameters:
      curMs - Current time/offset value (x-axis input)
      min - Minimum output value
      max - Maximum output value
      period - Duration of one complete sine wave cycle in seconds
      Returns:
      Value between min and max following a sine wave pattern
    • cosValue

      public static float cosValue(float curMs, float min, float max, float period)
      Maps a cosine wave to a value between min and max over a given period.
      Parameters:
      curMs - Current time/offset value (x-axis input)
      min - Minimum output value
      max - Maximum output value
      period - Duration of one complete cosine wave cycle in seconds
      Returns:
      Value between min and max following a cosine wave pattern