      (.copy *applet* img (int sx1) (int sy1) (int sx2) (int sy2)
             (int dx1) (int dy1) (int dx2) (int dy2))))
 
-(defn cos [angle] (PApplet/cos (float angle)))
+(defn cos
+  "Calculates the cosine of an angle. This function expects the values
+  of the angle parameter to be provided in radians (values from 0 to
+  Math/PI*2). Values are returned in the range -1 to 1."
+  [angle] (PApplet/cos (float angle)))
 
 (defn create-font
   ([name size] (.createFont *applet* name (float size)))

  (.curveTightness *applet* (float ti)))

(defn curve-vertex
  ([x y] (.curveVertex *applet* (float x) (float y)))
  ([x y z] (.curveVertex *applet* (float x) (float y) (float z))))



;; $$exec

(defn exit
  "Quits/stops/exits the program.  Rather than terminating
  immediately, exit will cause the sketch to exit after draw has
  completed (or after setup completes if called during the setup
  method). "
  []
  (.exit *applet*))

(defn exp
  "Returns Euler's number e (2.71828...) raised to the power of the
  value parameter."
  [val] (PApplet/exp (float val)))

;; $$expand

