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

7
LINES

< > BotCompany Repo | #1036102 // transformFromZeroToOne

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (9325L) is out of date.

1  
static double transformFromZeroToOne(double x, DoubleRange dest) {
2  
  ret dest.start+x*dest.length();
3  
}
4  
5  
static double transformFromZeroToOne(double destStart, double destEnd, double x) {
6  
  ret destStart+x*(destEnd-destStart);
7  
}

Author comment

Began life as a copy of #1032086

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1036102
Snippet name: transformFromZeroToOne
Eternal ID of this version: #1036102/3
Text MD5: 36113436b28d81b054095e5fdbc9d036
Author: stefan
Category: javax / maths
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-09-14 20:11:59
Source code size: 233 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 126 / 177
Version history: 2 change(s)
Referenced in: [show references]