Converting degrees to radians


The standard trigonometric functions uses an angle, measured in radian.

But what if input expression contains angle in degrees?

let test = "2 - sin(60)" |> Infix.parseOrUndefined

Is there any function for easy transformation?

(I looked to the source code but not found anything helpful for me)

(Christoph Rüegg) #2

Is this more about parsing (and potentially formatting) string expressions, or would you also have a need to represent it that way internally?


Well, I agree it’s rather Q about parsin/formatting. I just think it can be useful.

(Christoph Rüegg) #4

It could also be more, e.g. supporting units. If it is only about parsing/formatting, I may have a rough idea how we could support this (it is non-trivial since we’d likely want to apply automatic simplification to the argument transformation).


wow, it’s awesome news