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 June 17, 2024 02:30
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;
}