Skip to content

fix: Vector.equals() asymmetric result when dimensions differ#8999

Open
BHARATH0153 wants to merge 2 commits into
processing:mainfrom
BHARATH0153:fix/vector-equals-dimensions
Open

fix: Vector.equals() asymmetric result when dimensions differ#8999
BHARATH0153 wants to merge 2 commits into
processing:mainfrom
BHARATH0153:fix/vector-equals-dimensions

Conversation

@BHARATH0153

@BHARATH0153 BHARATH0153 commented Jul 21, 2026

Copy link
Copy Markdown

Fixes #8929

changes

  • components of another vector. Any missing parameters are assigned the value 0.
  • components of another vector.
  • If the two vectors have different lengths, a warning is logged and only
  • the components up to the shorter length are compared.

BHARATH0153 and others added 2 commits July 21, 2026 07:58
Fixes processing#8929

- Warn when comparing vectors of different sizes
- Compare components up to the shorter length
- Makes equals() symmetric regardless of which vector is called on
@BHARATH0153

Copy link
Copy Markdown
Author

@perminder-17 please review thanks!

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.

[p5.js 2.0+ Bug Report]: Vector.equals() is quirky when dimensions are not equal

1 participant