Skip to content
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

Use sind, cosd, etc., instead of sin, cos, etc. #50

Closed
singularitti opened this issue May 29, 2021 · 0 comments · Fixed by #51
Closed

Use sind, cosd, etc., instead of sin, cos, etc. #50

singularitti opened this issue May 29, 2021 · 0 comments · Fixed by #51
Assignees

Comments

@singularitti
Copy link
Member

It's more common to use degrees instead of radians in crystallography. Besides, sin and cos on floating point number is less accurate.

julia> sin(pi / 2)
1.0

julia> cos(pi / 2)
6.123233995736766e-17

julia> sind(90)
1.0

julia> cosd(90)
0.0

julia> tan(pi / 4)
0.9999999999999999

julia> tand(45)
1.0

julia> cot(pi / 4)
1.0000000000000002

julia> cotd(45)
1.0

julia> cos(pi)
-1.0

julia> sin(pi)
1.2246467991473532e-16

julia> cosd(180)
-1.0

julia> sind(180)
0.0
@singularitti singularitti self-assigned this May 29, 2021
singularitti added a commit that referenced this issue Aug 1, 2023
…22-06-25-00-10-56-976-00173023327

CompatHelper: bump compat for Functors to 0.3, (keep existing compat)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant