hopefully made math faster.
This commit is contained in:
@@ -35,15 +35,15 @@
|
||||
|
||||
(def selected-save (atom nil))
|
||||
|
||||
(defn current-music-volume [& [factor]]
|
||||
(* (Math/pow (/ (:music-volume @settings) 100.0) 2)
|
||||
0.25
|
||||
(or factor 1.0)))
|
||||
(defn current-music-volume [& [^double factor]]
|
||||
(-> (Math/pow (unchecked-multiply (:music-volume @settings) 0.01) 2)
|
||||
(unchecked-multiply 0.25)
|
||||
(unchecked-multiply (or factor 1.0))))
|
||||
|
||||
(defn current-sound-volume [& [factor]]
|
||||
(* (Math/pow (/ (:sound-volume @settings) 100.0) 2)
|
||||
0.5
|
||||
(or factor 1.0)))
|
||||
(-> (Math/pow (unchecked-multiply (:sound-volume @settings) 0.01) 2)
|
||||
(unchecked-multiply 0.5)
|
||||
(unchecked-multiply (or factor 1.0))))
|
||||
|
||||
(defn cursor [filename which]
|
||||
(let [scale 4
|
||||
|
||||
Reference in New Issue
Block a user