changed all float coercion to double coercion

This commit is contained in:
Richard Harrington 2013-08-23 10:51:56 -04:00
parent 8b9b11d803
commit 0945151aab
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@
(def op-map (into {} (for [op assembler/op-commands]
[op (case op
"/" #(int (Math/round (float (/ %1 %2))))
"/" #(int (Math/round (double (/ %1 %2))))
"#" not=
(-> op read-string eval))])))

View File

@ -50,12 +50,12 @@
(def robot-field-write-mixin
; returns a world with the value of a field in the robot hash map altered
; (with the number being cast to floating point before being pushed)
; (with the number being cast to double before being pushed)
(fn [{:keys [robot-idx field-name multiplier]} world data]
(assoc-in
world
(path-to-robot-field robot-idx field-name)
(float (* data multiplier)))))
(double (* data multiplier)))))
(defrecord StorageRegister [robot-idx reg-name val])
(extend StorageRegister