Skip to content

math.random(m, n) should return integer #871

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
FlashHit opened this issue Dec 20, 2021 · 5 comments
Closed

math.random(m, n) should return integer #871

FlashHit opened this issue Dec 20, 2021 · 5 comments
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@FlashHit
Copy link

You can see in the picture that s_Angle is a number but it should be an integer instead.
Might be because of math.random() -> number.

grafik

@sumneko sumneko added bug Something isn't working enhancement New feature or request labels Dec 20, 2021
@FlashHit
Copy link
Author

same thing with
math.floor(number) it should return an integer.

grafik

sumneko added a commit that referenced this issue Dec 21, 2021
@C3pa
Copy link
Contributor

C3pa commented May 26, 2022

@FlashHit could you re-test this and see if the issue still persists? This line suggests the issue is fixed.

@FlashHit
Copy link
Author

for me it still returns a number:
grafik
version 3.2.4

@C3pa
Copy link
Contributor

C3pa commented May 27, 2022

Yes, I also get the same behavior. The annotations are all right. It looks like the problem is something else. Sumneko, care to take a look?

@sumneko
Copy link
Collaborator

sumneko commented May 27, 2022

Currently, it is not supported to select the prototype through parameters. The return value you see is the union of all prototype return types.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants