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

Floating point + the random() function #1514

Closed
mknadler opened this issue Sep 1, 2015 · 0 comments · Fixed by #1517
Closed

Floating point + the random() function #1514

mknadler opened this issue Sep 1, 2015 · 0 comments · Fixed by #1517

Comments

@mknadler
Copy link

mknadler commented Sep 1, 2015

Bug exists in Ruby Sass as well; see sass/sass#1819.

Given two integers, x and y, normal behavior is:
x / y * y => x

With certain values for x, however:
x / y * y => x.0

Under normal circumstances, this is not much of a problem; e.g., for font size, it's nbd. However, this behavior causes some calls to the random function to fail unexpectedly, as that function expects an integer for the $limit parameter.

Example here: http://sassmeister.com/gist/247d0a8155bed38bbca2.

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.

2 participants