Skip to content

Instantly share code, notes, and snippets.

View StevenMDixon's full-sized avatar
🌲
いつもの通りに森に

Steven M. Dixon StevenMDixon

🌲
いつもの通りに森に
  • Rev.io
  • United States
View GitHub Profile
@xposedbones
xposedbones / map.js
Last active May 1, 2024 11:15
Javascript Map range of number to another range
Number.prototype.map = function (in_min, in_max, out_min, out_max) {
return (this - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}