Class ComplexValue.Float
java.lang.Object
nom.tam.util.ComplexValue
nom.tam.util.ComplexValue.Float
- Enclosing class:
ComplexValue
Single-precision complex values.
- Since:
- 1.18
- Author:
- Attila Kovacs
-
Nested Class Summary
Nested classes/interfaces inherited from class ComplexValue
ComplexValue.FloatModifier and TypeClassDescriptionstatic final classSingle-precision complex values. -
Field Summary
Fields inherited from class ComplexValue
I, ONE, ZEROModifier and TypeFieldDescriptionstatic final ComplexValueThe unity along the imaginary axis i, or (0.0, 1.0)static final ComplexValueThe complex unity along the real axis, or (1.0, 0.0)static final ComplexValueThe complex zero -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class ComplexValue
equals, hashCode, im, isFinite, isZero, re, toBoundedString, toString, toStringModifier and TypeMethodDescriptionbooleaninthashCode()final doubleim()Returns the imaginary part of this complex value.final booleanisFinite()Checks if the complex value is finite.final booleanisZero()Checks if the complex value is zero.final doublere()Returns the real part of this complex value.toBoundedString(int maxLength) Converts this comlex value to its string representation using up to the specified number of characters only.toString()toString(int decimals) Converts this complex value to its string representation with up to the specified number of decimal places showing after the leading figure, for both the real and imaginary parts.
-
Constructor Details
-
Float
public Float(float re, float im) Instantiates a new single-precision complex number value with the specified real and imaginary components.- Parameters:
re- the real partim- thei maginary part- Since:
- 1.20
-
Float
Instantiates a new single-precision complex number value from the string repressentation of it in a FITS header value. By default, it will parse complex numbers as a comma-separated pair of real values enclosed in a bracket, such as
(1.0, -2.0), or standard real values, such as123.456or123(as real-only values). There can be any number of spaces around the brackets, number components or the comma.- Parameters:
str- the FITS string representation of the complex value- Throws:
IllegalArgumentException- if the supplied string does not appear to be a FITS standard representation of a complex value.- Since:
- 1.20
-