Skip to content

Vector mismatch dimension prints warning message#8821

Open
limzykenneth wants to merge 3 commits into
processing:dev-2.0from
limzykenneth:vector-messages
Open

Vector mismatch dimension prints warning message#8821
limzykenneth wants to merge 3 commits into
processing:dev-2.0from
limzykenneth:vector-messages

Conversation

@limzykenneth
Copy link
Copy Markdown
Member

Resolves #8819 as well.

Changes:
When encountering vector dimension mismatch, a warning message will be printed to indicate that the smaller dimension vector is being presumed. Also resolves issue where not all elements were multiplied when multiplying a vector by a scalar.

The documentation still need updating.

@p5-bot
Copy link
Copy Markdown

p5-bot Bot commented May 22, 2026

Copy link
Copy Markdown
Member

@ksen0 ksen0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested to confirm the warnings appear only in the second case and not in the first false-positive case:

  v1 = createVector(2,3);
  console.log(v1.mult(3));
  console.log(v1.mult([3]));

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