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

Unable to declare negative numbers #3

Open
FlashFight opened this issue Sep 3, 2021 · 5 comments
Open

Unable to declare negative numbers #3

FlashFight opened this issue Sep 3, 2021 · 5 comments

Comments

@FlashFight
Copy link

float(-1.0), int(-1), etc. all return
ERROR: float() takes only const arguments
ERROR: int() takes only const arguments
etc.
I presume this is due to "-" being used for negation.

@igor-elovikov
Copy link
Owner

thanks for the report!
yeah, that's annoying (has to be -float(1.0), not the best solution)

I'll fix that in the upcoming update among other stuff

@Faranell
Copy link

Faranell commented Mar 27, 2023

Was this ever fixed? :)
I just found out that doing something like this is not possible right now either :(
float3(0.8, 0.4, -0.2)

PS. Great tool btw! Love it!

@igor-elovikov
Copy link
Owner

igor-elovikov commented Mar 28, 2023

yeah, it's fixed in dev branch among other things (for example declaring consts are much easier).

f3: float3 = {1.0, 2.0, 3.0}
f2: float3 = 1.0 # implicitly become {1.0, 1.0, 1.0}
f: float = 1.0
v: float4 = {f, f, f, 1.0}

etc

also more sane loops and much better support for parameters
it's just not very stable atm

I'm actually waiting for the new designer update where loops should be natively supported by function graphs and I add this to plugin. Then I merge new version to main

@Faranell
Copy link

Oww that sounds amazing <3

Seeing theres some new syntax, will it also support x += y or do we still need to do x = x + y?

@igor-elovikov
Copy link
Owner

yep, "augmented assigns" ie += -= *= is supported in the new branch

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

No branches or pull requests

3 participants