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

std/math_mod macro #54

Closed
Woccz opened this issue Jun 15, 2021 · 2 comments
Closed

std/math_mod macro #54

Woccz opened this issue Jun 15, 2021 · 2 comments
Labels
enhancement New feature or request nolol Issues only regarding NOLOL

Comments

@Woccz
Copy link
Contributor

Woccz commented Jun 15, 2021

Dependent on #50.

I think it would be good to define a mod(x,m) macro in the standard math library.

I've implemented the mod for my own project.

In std/math_basic.nolol

macro mod(x,m) expr
    x-x/m/1000*1000*m
end

In std/math_advanced.nolol

macro mod(x,m) expr
    x%m 
end

(Macro definitions assuming #55.)

Thank you.

@Woccz Woccz added the enhancement New feature or request label Jun 15, 2021
@dbaumgarten dbaumgarten added the nolol Issues only regarding NOLOL label Jun 15, 2021
@dbaumgarten
Copy link
Owner

Seems reasonable. In the long run, once #50 is done, there should be replacement-macros for all build-in chip operators (except for these that are available on all chips).

dbaumgarten added a commit that referenced this issue Jul 1, 2021
@dbaumgarten dbaumgarten added the waiting for release Has been implemented but not yet published label Jul 1, 2021
@dbaumgarten
Copy link
Owner

Done. Published as part of v0.1.5

@dbaumgarten dbaumgarten removed the waiting for release Has been implemented but not yet published label Jul 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request nolol Issues only regarding NOLOL
Projects
None yet
Development

No branches or pull requests

2 participants