   [n]
   (PApplet/abs (float n)))
 
-(def ^{:arglists (:arglists (meta #'abs-float))
-       :doc (:doc (meta #'abs-float))}
-  abs abs-float)
+(defn abs
+  "Calculates the absolute value (magnitude) of a number. The
+  absolute value of a number is always positive. Dynamically casts to
+  an int or float appropriately"
+    [n]
+    (if (int-like? n)
+      (abs-int n)
+      (abs-float n)))
 
 (defn acos
   "The inverse of cos, returns the arc cosine of a value. This
   function expects the values in the range of -1 to 1 and values are
   returned in the range 0 to Math/PI (3.1415927)."
   [n]
-  (PApplet/acos n))
+  (PApplet/acos (float n)))
 
 (defn alpha
   "Extracts the alpha value from a color."
   [color] (.alpha *applet* (int color)))
 
-(defn ambient
+(defn ambient-float
   "Sets the ambient reflectance for shapes drawn to the screen. This
   is combined with the ambient light component of environment. The
   color components set through the parameters define the


  It is not possible to use transparency (alpha) in background colors
  with the main drawing surface, however they will work properly with
  create-graphics."
  ([gray] (.background *applet* (float gray)))
  ([gray alpha] (.background *applet* (float gray) (float alpha)))
  ([r g b] (.background *applet* (float r) (float g) (float b)))

  [^String s] (.textWidth *applet* s))

(defn tint-float
  "Sets the fill value for displaying images. Images can be tinted to
  specified colors or made transparent by setting the alpha.

  To make an image transparent, but not change it's color, use white
  as the tint color and specify an alpha value. For instance,
  tint(255, 128) will make an image 50% transparent (unless
  colorMode() has been used).

  The value for the parameter gray must be less than or equal to the
  current maximum value as specified by colorMode(). The default
  maximum value is 255.

  Also used to control the coloring of textures in 3D."
  ([gray] (.tint *applet* (float gray)))
  ([gray alpha] (.tint *applet* (float gray) (float alpha)))
  ([r g b] (.tint *applet* (float r)(float g) (float b)))
  ([r g b a] (.tint *applet* (float g) (float g) (float b) (float a))))

(defn tint-int
  "Sets the fill value for displaying images. Images can be tinted to
  specified colors or made transparent by setting the alpha.

  To make an image transparent, but not change it's color, use white
  as the tint color and specify an alpha value. For instance,
  tint(255, 128) will make an image 50% transparent (unless
  colorMode() has been used).

  The value for the parameter gray must be less than or equal to the
  current maximum value as specified by colorMode(). The default
  maximum value is 255.

  Also used to control the coloring of textures in 3D."
  ([rgb] (.tint *applet* (int rgb)))
  ([rgb alpha] (.tint *applet* (int rgb) (float alpha))))

(defn tint
  "Sets the fill value for displaying images. Images can be tinted to
  specified colors or made transparent by setting the alpha.

  To make an image transparent, but not change it's color, use white
  as the tint color and specify an alpha value. For instance,
  tint(255, 128) will make an image 50% transparent (unless
  colorMode() has been used).

  The value for the parameter gray must be less than or equal to the
  current maximum value as specified by colorMode(). The default
  maximum value is 255.

  Also used to control the coloring of textures in 3D."
  ([rgb] (if (int-like? rgb) (tint-int rgb) (tint-float rgb)))
  ([rgb alpha] (if (int-like? rgb) (tint-int rgb alpha) (tint-float rgb alpha)))
  ([r g b] (tint-float r g b))
  ([r g b a] (tint-float r g b a)))

(defn translate
  "Specifies an amount to displace objects within the display
