Giter Site home page Giter Site logo

radians's Introduction

radians

degree radian conversion

In JavaScript, methods like Math.sin, Math.atan2, and CanvasRenderingContext2D.arc use radians instead of degrees. It may be helpful to have functions to convert between the two to reduce instances of Math.PI / 180 in your code, as they may appear misleading.

The API for this module is based off of Elm's built-in angle conversion functions.

usage

NPM

> const { degrees, radians } = require('radians')
> var angle = 45
> radians(degrees(angle)) === angle
true

degrees(degrees)

Converts degrees to its corresponding value in radians.

> degrees(30)
0.5235987755982988

radians(radians)

Converts radians to its corresponding value in degrees.

> radians(0.5235987755982988)
29.999999999999996

> radians(0.5235987755982989)
30.000000000000004

see also

license

MIT © Brandon Semilla

radians's People

Contributors

semibran avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.