A quick question about ParseToAngle

phanhuyen345 shared this question 2 years ago
Answered

Hello,

I know you can ParseToNumber[a,text1].

But can you do the same if you want the text to be converted to an angle measure?

So it might look like something like . . . ParseToAngle[α,text1]

If not - any suggestions on what I could do? I know how to convert a number to a angle . . . but could I also convert an an angle to a number?

Thanks.

Comments (2)

photo
1

an angle is a number with º at the end. º==pi/180 so 30º==30 pi/180 then you can use parsetonumber("45º") for getting an angle

photo
1

Exemple


a=2 (begin with a as a type of number)

then ==> parsetonumber(a,"45º") get a=45°

the type of a become an angle

© 2021 International GeoGebra Institute