Skip to content

arc() function docs say it only uses radians, but it actually listens to angleMode() #7562

Closed
@worthant

Description

@worthant

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

1.11.3

Web browser and version

all of them

Operating system

Linux Fedora Workstation 39 && Windows 11

Steps to reproduce this

Steps:

  1. Open web editor
  2. Write simple code to create an arc
  3. See that it's indeed degrees, not radians

Snippet:

function setup() {
  createCanvas(400, 400);
}

function draw() {
  background(220);
  arc(150, 150, 50, 50, 0, 45)
}

as you see, we draw an arc from 0 to 45 degrees, while it should be radians

here is what you get from this code:

Image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions