Skip to content

Commit afebbd3

Browse files
Merge pull request #4317 from CommunityToolkit/petea/issue/4316
Fix to issue #4316 - error in duration to frequency calculation.
2 parents 683a0e7 + c9d29f9 commit afebbd3

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)