Skip to content

Instantly share code, notes, and snippets.

@nashvail
Created October 29, 2017 06:15
Show Gist options
  • Save nashvail/7c0114ae0f2e5057d21781a7d0f55ab3 to your computer and use it in GitHub Desktop.
Save nashvail/7c0114ae0f2e5057d21781a7d0f55ab3 to your computer and use it in GitHub Desktop.
General physics simulation utils.
export default {
clamp (n, min, max) {
return Math.min(Math.max(n, min), max);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment