Skip to content

Commit c9d29f9

Browse files
author
Pete Ansell
committed
Fix to issue #4316 - error in duration to frequency calculation.
1 parent 683a0e7 commit c9d29f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Microsoft.Toolkit.Uwp.Input.GazeInteraction/OneEuroFilter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public virtual GazeFilterArgs Update(GazeFilterArgs args)
5757
Point cutoff = new Point(cf, cf);
5858

5959
// determine sampling frequency based on last time stamp
60-
float samplingFrequency = 100000000.0f / Math.Max(1, (args.Timestamp - _lastTimestamp).Ticks);
60+
var samplingFrequency = (float)TimeSpan.TicksPerSecond / Math.Max(1, (args.Timestamp - _lastTimestamp).Ticks);
6161
_lastTimestamp = args.Timestamp;
6262

6363
// calculate change in distance...

0 commit comments

Comments
 (0)