src/clojurecraft/units.clj @ 1e03d5cc372b

Refactor the loop stuff.
author Steve Losh <steve@stevelosh.com>
date Fri, 26 Aug 2011 18:02:11 -0400
parents 580584e8bfbd
children (none)
(ns clojurecraft.units
  (:use [clojurecraft.util])
  )

(defn to-pixels [n type]
  (case type
    :pixels [n :pixels]
    :meters [(* 32 n) :meters]))

(defn to-meters [n type]
  (case type
    :meters [n :meters]
    :pixels [(/ n 32) :pixels]))