So you can write
value.to_radians().to_radians()
then? Weird. value.to_radians().to_radians()
then? Weird.That said, this is probably such a simple use that it's not worth having Degree and Radian classes in core.
This sort of stuff works really well when the type system incorporates units of measure directly (usually as some kind of generic type parameter). F# is a good example.
var s1 = "blah"
var s2 = s1 as string
var s3 = s2 as string
edit: Nevermind, I guess you're wanting like types for units of measurement. Sounds interesting.Is the best way to solve that problem by introducing "unit measurement" types that are more specific than general numerical types? Or is there another way? Or even a general concept I can go read about? Thanks in advance!