Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

3
LINES

< > BotCompany Repo | #1015461 // adjustDouble - translate from one range to another

JavaX fragment (include)

static double adjustDouble(double x, double a1, double b1, double a2, double b2) {
  ret (x-a1)/(b1-a1)*(b2-a2)+a2;
}

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: 334 / 375
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)