Properties
Category
English
Similar Topics
Statistics
Comments
9
Participants
2
Subscribers
2
Votes
1
Views
244
Share
Rounding and Angles
Answered
The Wiki doesn't go into detail on the rounding function. I assume round(x) without an additional precision parameter just truncates the decimal part? So if an angle object was created using the angle tool and the angle was say 22 degrees and Geogebra holds angle values internally as radians (so 22 degrees <1 radian), how come if I do Y = round (x) with x as 22 degrees, the value displayed in the algebra view for Y is 22 degrees (rather than rounded down to 0)?
 GeoGebra
 Help
 Partners

Contact us
 Feedback & Questions
 This email address is being protected from spambots. You need JavaScript enabled to view it.
 +43 677 6137 2693
© 2020 International GeoGebra Institute
Just did some tests and it rounds numbers up or down to the nearest whole number. But what does it do with angles?
The algebra view displays angles as degrees. So does the round function round to the nearest degree (even though the value is stored internally in radians)?
'Round' rounds the numbers in the unit tey are stored to the unit. So if an angle is shown in degrees, degrees will be rounded, no radians. If the algebra view displays angles as degrees this means that the settings for angles is in degrees (Options  Advanced) so it's normal that degrees will be rounded. If you want to work and round radians you have to change the settings.
chris
I think I have it. It's under the "Algebra" settings window.
However the trig functions as I understand it take a radian argument, so if angles are displayed in degrees, they need to be converted to radians first to do any calculations?
this is a matter of users interface and internal programming, but this is the same for any calculator in which you can choose different modi. For the user the calculations are made in the chosen modus. That's the same with trigonomic functions.
If the chosen modus is degrees, you will find: cos (60) = 0.5 cos (60 rad) : 0.95 cos (60°) = 0.5
This illustrates that GeoGebra remembers the chosen settings and functions are calculated in this chosen modus. What happens internally is another question, that's a matter of conversion between internal calculations and users interface which indeed will require some conversions. Fortunately this is solved by developers
chris
Ok, but in my case I have a slider whose value is degrees and is used as the argument for sin and cos. I have to convert the value to radians for the calculations to work. That of course is because the value of the slider is a number, not an angle.
Hmm, but I just discovered now that a slider can be an angle value. That makes more sense. No need to do conversions!
Comments have been locked on this page!