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

max doesn't evaluate correctly on numbers in strings from 1.7.0 #6728

Closed
1 of 17 tasks
piecesofuk opened this issue Jan 11, 2024 · 0 comments · Fixed by #6730
Closed
1 of 17 tasks

max doesn't evaluate correctly on numbers in strings from 1.7.0 #6728

piecesofuk opened this issue Jan 11, 2024 · 0 comments · Fixed by #6730

Comments

@piecesofuk
Copy link

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build Process
  • Unit Testing
  • Internalization
  • Friendly Errors
  • Other (specify if possible)

p5.js version

1.7.0 and later

Web browser and version

No response

Operating System

No response

Steps to reproduce this

Comparing the p5 builtin max with the js Math max

Snippet:

  print(max("3.227389", "146.271501"));
  print(Math.max("3.227389", "146.271501"));

prior to 1.7.0 this logs
146.271501
146.271501
from 1.7.0 onwards this logs
3.227389
146.271501

I would expect the p5 max to behave the same way as the Math.max

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