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

@bothrs/math

Package Overview
Dependencies
Maintainers
5
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bothrs/math

Utility methods for solving common mathematical issues.

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

@bothrs/math

Utility methods for solving common mathematical issues.

Getting started

yarn add @bothrs/math

Contents

Conversion

  • toDegrees: Convert a radian value to degrees.
  • toRadians: Convert a degree value to radians.

Image

  • calculateScaleRatioFit: Calculate the linear scale ratio in which an image fits inside the requested container.

Matrix

  • getScalingMatrix
  • getTranslationMatrix
  • getRotationMatrix
  • getSVGTransformMatrix: Render out a transform matrix as an SVG Transform string.
  • getTransformMatrix: Generate a transform matrix with common edits and defaults.
  • multiplyMatrices

Number

  • getRandomInt: Generate a random integer between 2 values.
  • toFixed: Round a number to a fixed amount of fraction digits.

FAQs

Package last updated on 20 Apr 2023

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