def sexa.float

yaml-for-bend@0.1.1.0 · yaml11.bend:167

import yaml-for-bend@0.1.1.0/yaml11.bend as Yaml11
import Base
import yaml-for-bend@0.1.1.0/num.bend as N
import yaml-for-bend@0.1.1.0/core.bend as C

167# A base-60 float: the whole part in base 60, then the fraction.
168def sexa.float(+s: String) -> String:
169  +t = no.seps(s)
170  +body = C.unsigned(t)
171  N.dec.exact(Bool.pick(String, C.is_neg(t), "-", "") ++ N.big.show(sexa.big(String.split(before.dot(body), ':'))) ++ "." ++ after.dot(body))

Uses (13)

Used by (1)