mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
double version of map()
This commit is contained in:
@@ -2881,6 +2881,13 @@ public class PApplet extends Applet
|
||||
float ostart, float ostop) {
|
||||
return ostart + (ostop - ostart) * ((value - istart) / (istop - istart));
|
||||
}
|
||||
|
||||
|
||||
static public final double map(double value,
|
||||
double istart, double istop,
|
||||
double ostart, double ostop) {
|
||||
return ostart + (ostop - ostart) * ((value - istart) / (istop - istart));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user