SDRSharper/Plugins/SDRSharper.NoiseReduction/SDRSharp.NoiseReduction/ComplexHelper.cs

16 lines
276 B
C#
Raw Normal View History

using SDRSharp.Radio;
using System;
namespace SDRSharp.NoiseReduction
{
internal static class ComplexHelper
{
public static float FastMagnitude(this Complex c)
{
float val = Math.Abs(c.Real);
float val2 = Math.Abs(c.Imag);
return Math.Max(val, val2);
}
}
}