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

Object arithmetic #238

Merged
merged 5 commits into from Nov 2, 2022
Merged

Object arithmetic #238

merged 5 commits into from Nov 2, 2022

Conversation

felixroos
Copy link
Collaborator

@felixroos felixroos commented Nov 1, 2022

with this PR, it's now possible to do things like:

n("c3").add(n(2))
n("c3 f3").off(1/4, add(n(12)))
s("hh*2").speed("1 1.2").off(1/8, add(speed(.2)))

This did not work before because the number conversion was not working for objects. I changed it so that the conversion happens after all that object stuff, right before the arithmetic functions are called. I also simplified asNumber, because it is now not needed as often.

@felixroos felixroos merged commit 240a893 into main Nov 2, 2022
@felixroos felixroos deleted the object-arithmetic branch November 2, 2022 10:42
@felixroos felixroos mentioned this pull request Nov 3, 2022
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

Successfully merging this pull request may close these issues.

None yet

1 participant