diff --git a/src/Numerics/Complex32.cs b/src/Numerics/Complex32.cs index d2cfd930..608014d0 100644 --- a/src/Numerics/Complex32.cs +++ b/src/Numerics/Complex32.cs @@ -180,6 +180,7 @@ namespace MathNet.Numerics /// /// Gets the magnitude (or absolute value) of a complex number. /// + /// Assuming that magnitude of (inf,a) and (a,inf) is NaN and magnitude of (inf,inf) is inf /// The magnitude of the current instance. public float Magnitude { @@ -188,7 +189,7 @@ namespace MathNet.Numerics { float a = Math.Abs(_real); float b = Math.Abs(_imag); - if (float.IsPositiveInfinity(a) && float.IsPositiveInfinity(b)) + if (float.IsPositiveInfinity(a) && float.IsPositiveInfinity(b)) return float.PositiveInfinity; if (a > b) {