Skip to content

fix: handle zero-range in map() to avoid NaN/Infinity - #9056

Open
deepshekhardas wants to merge 1 commit into
processing:mainfrom
deepshekhardas:fix/8282-map-zero-range-v2
Open

fix: handle zero-range in map() to avoid NaN/Infinity#9056
deepshekhardas wants to merge 1 commit into
processing:mainfrom
deepshekhardas:fix/8282-map-zero-range-v2

Conversation

@deepshekhardas

Copy link
Copy Markdown

Fixes #8282

When \start1 === stop1, \map()\ divides by zero producing NaN/Infinity. Return \start2\ (the midpoint of the target range) instead.

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.

Add zero-range guard to map() to prevent NaN/Infinity when start1 equals stop1

1 participant