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

add "mod" function to FlxMath #3341

Merged
merged 4 commits into from
Jan 28, 2025
Merged

add "mod" function to FlxMath #3341

merged 4 commits into from
Jan 28, 2025

Conversation

cyn0x8
Copy link
Contributor

@cyn0x8 cyn0x8 commented Jan 23, 2025

this pr adds a more "mathematically accurate" alternative to the built-in modulo operator to FlxMath as a helper function


haxe a % b behavior (truncated division):

Divmod truncated.svg

By Mathnerd314159 - Own work based on: Divmod.svg by Salix alba, CC BY-SA 3.0, Link


a mod b behavior (euclidean division):

Divmod Euclidean.svg

By Mathnerd314159 - Own work based on: Divmod.svg by Salix alba, CC BY-SA 3.0, Link

@cyn0x8 cyn0x8 requested a review from Geokureli January 23, 2025 20:18
@cyn0x8 cyn0x8 requested a review from Geokureli January 28, 2025 06:02
@Geokureli Geokureli merged commit a7dcc5c into HaxeFlixel:dev Jan 28, 2025
11 checks passed
@Geokureli
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants