-
-
Notifications
You must be signed in to change notification settings - Fork 46.7k
Add sin function to /maths #5949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your pull request!🤩
>>> sin(270.0) | ||
-1.0 | ||
>>> sin(0.68) | ||
0.0118679603 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but this seems to be incorrect? sin(0.68) = 0.628793
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The math.sin
function in python accepts an angle measured in radians, but my sin function accepts an angle measured in degrees.
If you tested that with math.sin
function, do like this to get the right result:
>>> import math
>>> math.sin(math.radians(0.68))
0.011867960298537237
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, sin(9999.0) = -0.9876883405951389
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your pull request!🤩
Describe your change:
Checklist:
Fixes: #{$ISSUE_NO}
.