Skip to content

[p5.js 2.0+ Bug Report]: FES warning for mismatched vector sizes doesn't show the line where the issue occurred, and has spelling errors #8835

@sidwellr

Description

@sidwellr

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • WebGPU
  • p5.strands
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

2.3.0.rc-6

Web browser and version

Brave 1.90.122

Operating system

Linux Mint 22.1

Steps to reproduce this

Snippet:

function setup() {
  let v = createVector(1,2);
  let w = createVector(1,2,3);
  v.add(w);
  print(v.toString());
}

The output is:

When working with two vectors of different sizes, the smaller dimension is used. In this operation, both vector will be treated as 2D vectors, and any additional values of the linger vector will be ignored. 
vector[2, 4] 

It doesn't include the number of the line that caused the issue (line 4 here), and there are two spelling errors: "both vector" should be "both vectors", and "the linger vector" should be "the longer vector"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions