double version of map()

This commit is contained in:
benfry
2009-05-07 21:04:42 +00:00
parent d3a878dc1c
commit c71851ffa2
+7
View File
@@ -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));
}