1 | static double adjustDouble(double x, double a1, double b1, double a2, double b2) {
|
2 | ret (x-a1)/(b1-a1)*(b2-a2)+a2; |
3 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1015461 |
| Snippet name: | adjustDouble - translate from one range to another |
| Eternal ID of this version: | #1015461/1 |
| Text MD5: | ac5b36a7ed5a6f824df17d02f009b75a |
| Author: | stefan |
| Category: | javax / maths |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-05-14 19:14:22 |
| Source code size: | 119 bytes / 3 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 552 / 596 |
| Referenced in: | [show references] |