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

Can we support ~== for floating point comparison? #100

Open
davesmith00000 opened this issue Nov 26, 2023 · 0 comments
Open

Can we support ~== for floating point comparison? #100

davesmith00000 opened this issue Nov 26, 2023 · 0 comments
Labels
enhancement New feature or request syntax sugar

Comments

@davesmith00000
Copy link
Member

It isn't GLSL, but it would be handy for simple colour value comparisons and such...

Usage:

if 1.0f ~== vec2(1.0f).x then ??? else ???

Which expands to something like:

if abs(1.0f - vec2(1.0f).x) < 0.001f then ??? else ???
@davesmith00000 davesmith00000 added enhancement New feature or request syntax sugar labels Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request syntax sugar
Projects
None yet
Development

No branches or pull requests

1 participant