Skip to content

Conversation

kleydon
Copy link

@kleydon kleydon commented Jan 14, 2023

Currently, this library applies filtering/smoothing for values on Android devices, but does not (yet) apply filtering/smoothing for iOS devices. As a result, behavior seems inconsistent across platforms.

This PR normalizes smoothing/filtering, so that it is handled the same way across both platforms.

It provides two related methods:

setSmoothingFactor(smoothingFactor)  // where smoothingFactor is a number [0.0-1.0]
getSmoothingFactor()  // async

... and employs the pre-existing default filtering value/equation for Android, i.e: smoothed = 0.3*new + (1.0 - 0.3)*old

This PR includes the changes of PR #4, enabling this library to be used in typescript react-native projects.

@kleydon kleydon mentioned this pull request Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant