Browse Source

Added remark for Magnitude

netstandard
MaLiN2223 11 years ago
parent
commit
75ba3f8279
  1. 3
      src/Numerics/Complex32.cs

3
src/Numerics/Complex32.cs

@ -180,6 +180,7 @@ namespace MathNet.Numerics
/// <summary> /// <summary>
/// Gets the magnitude (or absolute value) of a complex number. /// Gets the magnitude (or absolute value) of a complex number.
/// </summary> /// </summary>
/// <remarks>Assuming that magnitude of (inf,a) and (a,inf) is NaN and magnitude of (inf,inf) is inf</remarks>
/// <returns>The magnitude of the current instance.</returns> /// <returns>The magnitude of the current instance.</returns>
public float Magnitude public float Magnitude
{ {
@ -188,7 +189,7 @@ namespace MathNet.Numerics
{ {
float a = Math.Abs(_real); float a = Math.Abs(_real);
float b = Math.Abs(_imag); float b = Math.Abs(_imag);
if (float.IsPositiveInfinity(a) && float.IsPositiveInfinity(b)) if (float.IsPositiveInfinity(a) && float.IsPositiveInfinity(b))
return float.PositiveInfinity; return float.PositiveInfinity;
if (a > b) if (a > b)
{ {

Loading…
Cancel
Save