Package org.hipparchus.util
Class FieldSinCos<T>
java.lang.Object
org.hipparchus.util.FieldSinCos<T>
- Type Parameters:
T
- the type of the field elements
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:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncos()
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.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.
-
Constructor Details
-
FieldSinCos
Simple constructor.- Parameters:
sin
- value of the sinecos
- value of the cosine
-
-
Method Details
-
sin
Get the value of the sine.- Returns:
- value of the sine
-
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
-