Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eyeglass-math

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eyeglass-math

Math. For Sass.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1K
decreased by-30.18%
Maintainers
1
Weekly downloads
 
Created
Source

Eyeglass Math

This eyeglass plugin exposes Javascript's Math API to Sass.

To use it:

$ npm install --save eyeglass-math

Then in your Sass file(s):

@import "math";

API

The following constants are available when you import the math module.

  • $PI - The ratio of a circle's circumference to its diameter.
  • $TAU - Because Pi is wrong.
  • $E - The natural base (2.718…).

The following functions are available when you import the math module.

math/numeric
  • sign($number) - Returns the sign of the x, indicating whether $number is positive (1), negative (-1) or zero (0).
math/exponentiation
  • cbrt($number) - Returns the cube root of a number.
  • exp($number) - Returns E^x, where x is the argument, and E is Euler's constant (2.718…), the base of the natural logarithm.
  • log($number) - Returns the natural logarithm of a number.
  • log10($number) - Returns the base 10 logarithm of a number.
  • log2($number) - Returns the base 2 logarithm of a number.
  • pow(base, exponent) - Returns $base to the $exponent power.
  • sqrt($number) - Returns the positive square root of a number.
math/trigonometry
  • acos($number) - Returns the arccosine of a number.
  • asin($number) - Returns the arcsine of a number.
  • atan($number) - Returns the arctangent of a number.
  • cos($number) - Returns the cosine of a number.
  • hypot($numbers...) - Returns the square root of the sum of squares of its arguments.
  • sin($number) - Returns the sine of a number.
  • tan($number) - Returns the tangent of a number.
math/hyperbolic
  • acosh($number) - Returns the hyperbolic arccosine of a number.
  • asinh($number) - Returns the hyperbolic arcsine of a number.
  • atanh($number) - Returns the hyperbolic arctangent of a number.
  • cosh($number) - Returns the hyperbolic cosine of a number.
  • sinh($number) - Returns the hyperbolic sine of a number.
  • tanh($number) - Returns the hyperbolic tangent of a number.

Note: The functions above are available as globals with the prefix math-.

Keywords

FAQs

Package last updated on 19 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc