Class Sine

java.lang.Object
ch.epfl.cs107.play.signal.wave.Sine
All Implemented Interfaces:
Signal

public class Sine extends Object
Implementation of a Sine waveform
  • Field Summary

    Fields inherited from interface ch.epfl.cs107.play.signal.Signal

    EPSILON
  • Constructor Summary

    Constructors
    Constructor
    Description
    Sine(float lambda, float a, float phi)
    Default Sine Waveform constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    getIntensity(float t)
    Intensity getter for given time

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface ch.epfl.cs107.play.signal.Signal

    is
  • Constructor Details

    • Sine

      public Sine(float lambda, float a, float phi)
      Default Sine Waveform constructor
      Parameters:
      lambda - (float): wavelength
      a - (float): amplitude
      phi - (float): phase
  • Method Details

    • getIntensity

      public float getIntensity(float t)
      Description copied from interface: Signal
      Intensity getter for given time
      Parameters:
      t - (float): the time at which we want the intensity
      Returns:
      (float): signal intensity, usually between 0.0 and 1.0