Skip to content

[p5.js 2.0 Bug Report]: atan() logs an error when used outside strands #8092

@davepagurek

Description

@davepagurek

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

Web browser and version

All

Operating system

All

Steps to reproduce this

Steps:

  1. Use atan() outside of a shader
  2. It logs p5.js says: It looks like you've called atan outside of a shader's modify() function. and returns undefined rather than working properly

This looks like the same issue as #8026 and likely needs to be fixed the same way as #8036

Snippet:

function setup() {
  createCanvas(400, 400);
  console.log(atan(0.5))
}

Live: https://editor.p5js.org/davepagurek/sketches/cJ6IjhxqP

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Completed

Relationships

None yet

Development

No branches or pull requests

Issue actions