Skip to content

Add Processing math constants and Processing-specific math functions#165

Open
pepc84 wants to merge 3 commits into
processing:mainfrom
pepc84:feat/math-functions
Open

Add Processing math constants and Processing-specific math functions#165
pepc84 wants to merge 3 commits into
processing:mainfrom
pepc84:feat/math-functions

Conversation

@pepc84

@pepc84 pepc84 commented Jun 9, 2026

Copy link
Copy Markdown

Adds Processing math constants and Processing-specific math functions to mewnala.

Math constants (#128): PI, TWO_PI, TAU, HALF_PI, QUARTER_PI, DEG_TO_RAD, RAD_TO_DEG

Processing-specific math functions (#135, #140): sq, constrain, remap, lerp, norm, dist, mag

Note: stdlib duplicates like sin, cos, abs, min, max, floor, ceil, sqrt etc. are intentionally omitted since Python already provides these. Users should use Python's math module instead. map() is renamed to remap() to avoid collision with Python's builtin map() as discussed in #131.

Tested on Arch Linux x11.

@pepc84 pepc84 closed this Jun 9, 2026
@pepc84 pepc84 reopened this Jun 9, 2026
@pepc84 pepc84 changed the title Add Processing math functions (closes #135, closes #140) Add Processing math constants and Processing-specific math functions Jun 9, 2026
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.

1 participant