Skip to content

[p5.js 2.0 Bug Report]: types say p5.Vector.cross(v1,v2) returns number not Vector (jsdoc+types only) #8335

@nbogie

Description

@nbogie

Most appropriate sub-area of p5.js?

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

p5.js version

2.1.2

Web browser and version

n/a

Operating system

n/a

Steps to reproduce this

Steps:

Look at source for p5.Vector.js static version of cross()

Snippet:

/**
   * Calculates the cross product of two vectors.
   */
  /**
   * @static
   * @param  {p5.Vector} v1 first <a href="#/p5.Vector">p5.Vector</a>.
   * @param  {p5.Vector} v2 second <a href="#/p5.Vector">p5.Vector</a>.
   * @return {Number}     cross product.
   */
  static cross(v1, v2) {
    return v1.cross(v2);
  }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions