mirror of
https://github.com/SDRSharpR/SDRSharper.git
synced 2025-12-06 04:12:02 +01:00
16 lines
276 B
C#
16 lines
276 B
C#
|
|
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);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|