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

Rewrite number library #2903

Merged
merged 2 commits into from
Nov 28, 2023
Merged

Rewrite number library #2903

merged 2 commits into from
Nov 28, 2023

Conversation

Vurv78
Copy link
Contributor

@Vurv78 Vurv78 commented Nov 24, 2023

Resolves #2900

  • Add _INF
  • Converted all functions and operators to e2function syntax
  • Optimized / rewritten a good portion of functions
  • Lowered op cost of radian trig functions from 2 -> 1.5 ops (cheaper than deg functions now)
  • Deprecated "constant" functions (ie e(), inf(), pi()) since you can use their constant counterparts _E, _INF, _PI
  • Tagged all math functions with nodiscard
  • New blazingly fast 🚀 base conversion algorithm for toString(nn) (still raised op cost for it since you should really be using format instead, or wait for format strings)

Performance

Number functions should run faster as they will be on the new compiler rewrite format. Op costs haven't changed however. They should've been higher before.

@Vurv78 Vurv78 changed the title Rewrite number library Rewrite number library Nov 24, 2023
* Fix using incorrect arguments in functions
* Tag more functions as explicitly `number` parameters
* More test coverage
@Vurv78
Copy link
Contributor Author

Vurv78 commented Nov 24, 2023

Linter coming in clutch

@Vurv78 Vurv78 merged commit a5ff4ba into wiremod:master Nov 28, 2023
1 check passed
@Vurv78 Vurv78 deleted the number2 branch November 28, 2023 00:03
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.

2 participants