Browse Source

Magnitude of Complex(inf,inf) == inf

netstandard
MaLiN2223 11 years ago
parent
commit
9382d19f00
  1. 2
      src/Numerics/Complex32.cs

2
src/Numerics/Complex32.cs

@ -188,6 +188,8 @@ 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))
return float.PositiveInfinity;
if (a > b) if (a > b)
{ {
double tmp = b / a; double tmp = b / a;

Loading…
Cancel
Save