-
Notifications
You must be signed in to change notification settings - Fork 966
Add new expressions #2558
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
Add new expressions #2558
Conversation
Ready for a review. |
Nice! Would you be able to also add "free" expressions (without an object) |
I think the syntax for the C++ part is basic, i don't know how to call constant for Pi, so i've used a basic |
4cfca8b
to
501d5ba
Compare
* @param distance The distance from the object, in pixels. | ||
*/ | ||
export const XFromAngleAndDistance = function ( | ||
positionX: float, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove the positionX argument :) Usually these expressions just take angle/distance as the origin is considered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What ?!
This is the free expression, we need a starting position.
Or i miss something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@4ian This is the free expression, the expression based object is on the other file. See my other comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Silver-Streak What do you think? Usually in these mathematical/vector helper functions, 0;0 is always considered as the origin. I'm just a bit afraid of XFromAngleAndDistance(100, 45, 100)
being more cryptic than 100 + XFromAngleAndDistance(45, 100)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooohh okey I see what you mean now, i agree with you 100 + XFromAngleAndDistance(45, 100)
is better, I'll remove position
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, almost there! 👍
4232c85
to
921f19b
Compare
It's ready to merge, i've made changes and tested. |
Merged, thanks! |
Thanks you too! |
Close #2367
The center of the object is used, we should explain this somewhere?