-
Notifications
You must be signed in to change notification settings - Fork 73
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
Ternary Operators #36
Comments
I've made a branch, but I can't test it out because of OpenAI's API rate limits. |
@FlooferLand I think we have a more comprehensive solution with the RAG LLM approach (#47) @ngrealish once the PR above is merged ternary operator would be translated correctly. PLEASE FILE TRANSLATION REQUESTS |
Fix has been merged into master. |
In C# / Unity, to write a Ternary operator, syntax is
variable = (condition) ? true : false;
Where in GDScript, it's
variable = true if (condition) else false
Here is an example from one of my projects:
C#:
max_pos.x = (booster_offset.x > max_pos.x) ? booster_offset.x : max_pos.x
GDScript:
max_pos.x = booster_offset.x if (booster_offset.x > max_pos.x) else max_pos.x
If there's a way to add this to the conversion or train gpt for this, that'd be great for someone like me who uses ternary operators quite often.
The text was updated successfully, but these errors were encountered: