Magnitude
public struct Magnitude : NumericType
The Magnitude is a unit of flux.
-
The Magnitude value
Declaration
Swift
public let value: Double -
Creates a new Magnitude instance.
Declaration
Swift
public init(_ value: Double)Parameters
valueThe Magnitude value
-
Combine two magnitudes.
Declaration
Swift
func combine(with m2: Magnitude) -> MagnitudeParameters
m2The secondary magnitude
Return Value
The combined magnitude.
-
Compute the brightness ratio, for a given secondary magnitude.
Declaration
Swift
func brightnessRatio(with m2: Magnitude) -> DoubleParameters
m2The other magnitude.
Return Value
The brightness ratio.
-
Compute the geometrical distance, in parsec, for the current apparent magnitude.
Declaration
Swift
func distance(forAbsoluteMagnitude M: Magnitude, visualAbsorption Av: Magnitude = 0.0) -> ParsecParameters
MThe absolute magnitude of the object.
AvThe visual absorption factor.
Return Value
The distance, in parsec.
-
Compute the magnitude difference for a given brightness ratio.
Declaration
Swift
static func magnitudeDifference(forBrightnessRatio r: Double) -> MagnitudeParameters
rThe brightness ratio.
Return Value
The magnitude difference.
View on GitHub
Install in Dash
Magnitude Structure Reference