Class SinCos


  • public class SinCos
    extends Object
    Holder for both sine and cosine values.

    This class is a simple container, it does not provide any computational method.

    Since:
    1.3
    See Also:
    FastMath.sinCos(double)
    • Method Detail

      • sin

        public double sin()
        Get the value of the sine.
        Returns:
        value of the sine
      • cos

        public double cos()
        Get the value of the cosine.
        Returns:
        value of the cosine
      • sum

        public static SinCos sum​(SinCos scAlpha,
                                 SinCos scBeta)
        Compute sine and cosine of angles sum.
        Parameters:
        scAlpha - \((\sin \alpha, \cos \alpha)\)
        scBeta - \((\sin \beta, \cos \beta)\)
        Returns:
        \((\sin \alpha+\beta, \cos \alpha+\beta)\)
        Since:
        1.8
      • difference

        public static SinCos difference​(SinCos scAlpha,
                                        SinCos scBeta)
        Compute sine and cosine of angles difference.
        Parameters:
        scAlpha - \((\sin \alpha, \cos \alpha)\)
        scBeta - \((\sin \beta, \cos \beta)\)
        Returns:
        \((\sin \alpha+\beta, \cos \alpha-\beta)\)
        Since:
        1.8