11using System ;
2- using TabletDriverPlugin ;
3- using TabletDriverPlugin . Attributes ;
4- using TabletDriverPlugin . Tablet ;
2+ using System . Numerics ;
3+ using OpenTabletDriver . Plugin . Attributes ;
4+ using OpenTabletDriver . Plugin . Tablet ;
55
66namespace TabletDriverFilters
77{
@@ -11,11 +11,11 @@ namespace TabletDriverFilters
1111 public class TabletFilterSmoothing : IFilter
1212 {
1313 private DateTime ? _lastFilterTime ;
14- private Point _lastPos ;
14+ private Vector2 _lastPos ;
1515 private float _timerInterval ;
1616 private const float _threshold = 0.63f ;
1717
18- public Point Filter ( Point point )
18+ public Vector2 Filter ( Vector2 point )
1919 {
2020 var timeDelta = DateTime . Now - _lastFilterTime ;
2121 // If a time difference hasn't been established or it has been 100 milliseconds since the last filter
@@ -26,7 +26,7 @@ public Point Filter(Point point)
2626 }
2727 else
2828 {
29- Point pos = new Point ( _lastPos . X , _lastPos . Y ) ;
29+ Vector2 pos = new Vector2 ( _lastPos . X , _lastPos . Y ) ;
3030 float deltaX = point . X - _lastPos . X ;
3131 float deltaY = point . Y - _lastPos . Y ;
3232
@@ -41,7 +41,7 @@ public Point Filter(Point point)
4141 }
4242 }
4343
44- private void SetPreviousState ( Point lastPosition )
44+ private void SetPreviousState ( Vector2 lastPosition )
4545 {
4646 _lastPos = lastPosition ;
4747 _lastFilterTime = DateTime . Now ;
0 commit comments