Package org.hipparchus.util
Class FieldSinCos<T>
- java.lang.Object
-
- org.hipparchus.util.FieldSinCos<T>
-
- Type Parameters:
T
- the type of the field elements
public class FieldSinCos<T> extends Object
Holder for both sine and cosine values.This class is a simple container, it does not provide any computational method.
- Since:
- 1.4
- See Also:
FastMath.sinCos(org.hipparchus.CalculusFieldElement)
-
-
Constructor Summary
Constructors Constructor Description FieldSinCos(T sin, T cos)
Simple constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description T
cos()
Get the value of the cosine.static <S extends CalculusFieldElement<S>>
FieldSinCos<S>difference(FieldSinCos<S> scAlpha, FieldSinCos<S> scBeta)
Compute sine and cosine of angles difference.T
sin()
Get the value of the sine.static <S extends CalculusFieldElement<S>>
FieldSinCos<S>sum(FieldSinCos<S> scAlpha, FieldSinCos<S> scBeta)
Compute sine and cosine of angles sum.
-
-
-
Method Detail
-
sin
public T sin()
Get the value of the sine.- Returns:
- value of the sine
-
cos
public T cos()
Get the value of the cosine.- Returns:
- value of the cosine
-
sum
public static <S extends CalculusFieldElement<S>> FieldSinCos<S> sum(FieldSinCos<S> scAlpha, FieldSinCos<S> scBeta)
Compute sine and cosine of angles sum.- Type Parameters:
S
- the type of the field elements- Parameters:
scAlpha
- \((\sin \alpha, \cos \alpha)\)scBeta
- \((\sin \beta, \cos \beta)\)- Returns:
- \((\sin \alpha+\beta, \cos \alpha+\beta)\)
- Since:
- 1.8
-
difference
public static <S extends CalculusFieldElement<S>> FieldSinCos<S> difference(FieldSinCos<S> scAlpha, FieldSinCos<S> scBeta)
Compute sine and cosine of angles difference.- Type Parameters:
S
- the type of the field elements- Parameters:
scAlpha
- \((\sin \alpha, \cos \alpha)\)scBeta
- \((\sin \beta, \cos \beta)\)- Returns:
- \((\sin \alpha+\beta, \cos \alpha-\beta)\)
- Since:
- 1.8
-
-