From 75ba3f82791806383a4864224f3de0b08348f958 Mon Sep 17 00:00:00 2001 From: MaLiN2223 Date: Sun, 24 Jan 2016 14:07:30 +0100 Subject: [PATCH] Added remark for Magnitude --- src/Numerics/Complex32.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {