I can't figure out how to convert a decimal with a unit of measure to a float with a unit of measure.
I experimented with code similar to:
let toFloat (value: decimal<'T>) = let value = float (value / LanguagePrimitives.GenericOne<decimal<'T>>) value * LanguagePrimitives.GenericOne<float<'T>>
This method creates a decimal → float signature, which I don't want. I am trying to create a function like decimal <'T> → float <' T>.
Is it possible to create such a function? If so, what does it look like?
source share