Skip to content

[p5.js 2.0+ Bug Report]: Quaternion Multiplication typo/error #9006

Description

@roymacdonald

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.*

Web browser and version

all

Operating system

all

Steps to reproduce this

There is a typo in the p5.Quat multiplication;
In line https://github.com/processing/p5.js/blob/main/src/webgl/p5.Quat.js#L44 where it reads this.vec.z - quat.vec.z it should be this.vec.z * quat.vec.z. It is just replacing the - for *.
It quite easy to verify agains the textbook quaternion multiplication.
I am not sure about the implications this has in p5, as of how extensively this has afected p5 in general.
Not sure either if there have been other fixes to compesate this error in other places of the math.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status
    Completed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions