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

Builtins for converting floats to ints #77

Closed
dcutting opened this issue Mar 2, 2018 · 1 comment
Closed

Builtins for converting floats to ints #77

dcutting opened this issue Mar 2, 2018 · 1 comment
Labels

Comments

@dcutting
Copy link
Owner

dcutting commented Mar 2, 2018

truncate(5.7) # 5
truncate(-5.7) # -5
round(5.7) # 6
round(-5.7) # -6
round(5.2) # 5
round(-5.2) # -5
floor(5.7) # 5
floor(-5.7) # -6
ceiling(5.7) # 6
ceiling(-5.7) # -5
@dcutting
Copy link
Owner Author

dcutting commented Mar 3, 2018

Added truncate built-in. The rest can be implemented in terms of truncate in a standard library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant