Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Type coercions for map-to (float), added map-to-double

  • Loading branch information...
commit d7026e7d36c55bb9d957ebbf8a3a7c9756276b32 1 parent 1c6640c
@rosado authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/rosado/processing.clj
View
5 src/rosado/processing.clj
@@ -485,7 +485,10 @@
;; $$main
(defn map-to [val istart istop ostart ostop]
- (PApplet/map val istart istop ostart ostop))
+ (PApplet/map (float val) (float istart) (float istop) (float ostart) (float ostop)))
+
+(defn map-to-double [val istart istop ostart ostop]
+ (PApplet/map (double val) (double istart) (double istop) (double ostart) (double ostop)))
(defn mask
([#^ints alpha-array] (.mask *applet* alpha-array)))
Please sign in to comment.
Something went wrong with that request. Please try again.