   Prefer using create-image over initialising new PImage instances
   directly."
   [w h format]
-  (let [format (resolve-constant-key format image-formats)]
-    (.createImage (current-applet) (int w) (int h) (int format))))
+  (let [format (u/resolve-constant-key format image-formats)]
+    (.createImage (ap/current-applet) (int w) (int h) (int format))))
 
 (defn
   ^{:requires-bindings true

  A new line is put between each element of the array. This function can only print 1D arrays,
  but can test to see if the content are null or not null for 2+ dimensional arrays."
     [msg]
     (.println (current-applet) msg)))

#?(:cljs
   (defn

  value. Therefore, mag is a shortcut for writing (dist 0 0 x y)."
  ([a b]
   #?(:clj (PApplet/mag (float a) (float b))
      :cljs (.mag (ap/current-applet) a b)))
  ([a b c]
   #?(:clj (PApplet/mag (float a) (float b) (float c))
      :cljs (.mag (ap/current-applet) a b c))))

(defn
  ^{:requires-bindings false
