diff options
author | Eduardo Julian | 2018-07-04 22:38:56 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-04 22:38:56 -0400 |
commit | 376ed521cd92c2c53f2e9cc3cb16b85b67e2fdea (patch) | |
tree | 338f244cf5e7b53dc43724c826285689481808b5 /new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux | |
parent | 4bc58162f3d381abf33c936eafc976a2f422258c (diff) |
- Re-named "degree" to "revolution".
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux index 5fedc9a9e..753f1ce45 100644 --- a/new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/js/primitive.jvm.lux @@ -15,27 +15,11 @@ (def: low-mask Nat (dec (bit.left-shift +32 +1))) -(def: #export (translate-nat value) - (-> Nat (Meta Expression)) - (let [high (|> value - (bit.logical-right-shift +32) - .int %i) - low (|> value - (bit.and low-mask) - .int %i)] - (meta/wrap (format runtimeT.int//new "(" high "," low ")")))) - -(def: #export translate-int +(def: #export (translate-int value) (-> Int (Meta Expression)) - (|>> .nat translate-nat)) - -(def: deg-to-nat - (-> Deg Nat) - (|>> (:coerce Nat))) - -(def: #export translate-deg - (-> Deg (Meta Expression)) - (|>> deg-to-nat translate-nat)) + (let [high (|> value (bit.logical-right-shift +32) %i) + low (|> value (bit.and low-mask) %i)] + (meta/wrap (format runtimeT.int//new "(" high "," low ")")))) (def: #export translate-frac (-> Frac (Meta Expression)) |