Skip to content

sin(90) after angleMode(DEGREES) gives different result to sin(radians(90)) #8719

@rruubboott

Description

@rruubboott

Most appropriate sub-area of p5.js?

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

p5.js version

1.11.13

Web browser and version

146.0.7680.178 (Official Build) (arm64)

Operating system

mac OS Sequoia 15.7.3

Steps to reproduce this

Steps:

Snippet:

// Paste your code here :)

function setup() {
  createCanvas(400, 400);
  angleMode(DEGREES);
  console.log(sin(90)); // 1
  
  console.log(sin(radians(90))); // 0.027412133592044294
}

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