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

New extension: Round to any number #1270

Closed
3 tasks done
NiQsterVX opened this issue May 4, 2024 · 1 comment
Closed
3 tasks done

New extension: Round to any number #1270

NiQsterVX opened this issue May 4, 2024 · 1 comment
Labels
✨ New extension A new extension

Comments

@NiQsterVX
Copy link

Description

This extension adds the ability to round to any number. Useful for things like a grid system.

How to use the extension

The extension is used through a function RoundToAnyNumber::RoundTo() where the first number is the number to be rounded and the second number is the number to round to.
It works based on this formula: round(Number1 / Number2) * Number2

Examples:
Rounding 12345 to 100 will give 12300.
Rounding 720 to 300 will give 600.
Rounding 7382.8129 to 0.29 will give 7 382.82 (which is a multiple of 0.29).

Checklist

  • I've followed all of the best practices.
  • I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

What tier of review do you aim for your extension?

Community (Unreviewed)

Example file

Round to any number example.zip

Extension file

RoundToAnyNumber.zip

@NiQsterVX NiQsterVX added the ✨ New extension A new extension label May 4, 2024
@github-actions github-actions bot closed this as completed May 4, 2024
Copy link
Contributor

github-actions bot commented May 4, 2024

Hi @NiQsterVX! 👋 This submission has passed all required tests, and has been moved to a PR as part of our submission pipeline. You can see the progress of your submission on this page. Community submissions are not reviewed by default, so your extension should be added once we've checked that your submission doesn't contain malicious code without further intervention on your part. If you wish for your extension to be reviewed (and thereby moved to the list of reviewed extensions), please follow the instructions written on the README. Thanks again for your contribution to GDevelop!

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

No branches or pull requests

1 participant