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α,cosα)
        scBeta - (sinβ,cosβ)
        Returns:
        (sinα+β,cosα+β)
        Since:
        1.8
      • difference

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