JSPM

@aceworks-studio/math

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15
  • Score
    100M100P100Q42826F
  • License MIT

A set of Luau utility functions related to math or numbers

Package Exports

  • @aceworks-studio/math
  • @aceworks-studio/math/src/init.lua

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@aceworks-studio/math) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

checks version GitHub top language license npm

@aceworks-studio/math

A set of utility functions related to math or numbers.

Installation

Add @aceworks-studio/math in your dependencies:

yarn add @aceworks-studio/math

Or if you are using npm:

npm install @aceworks-studio/math

Content

isFinite

function isFinite(value: number): boolean

Returns true if the number not equal to infinity (or negative infinity) or NaN.

isInteger

function isInteger(value: number): boolean

Returns true if the number is finite and a whole number (no decimal part).

isNaN

function isNaN(value: number): boolean

Returns true if the number is NaN.

lerp

function lerp(initialValue: number, finalValue: number, alpha: number): number

Returns a number interpolated between an initial value and a final value using a number alpha between 0 and 1.

License

This project is available under the MIT license. See LICENSE.txt for details.

Other Lua Environments Support

If you would like to use this library on a Lua environment where it is currently incompatible, open an issue (or comment on an existing one) to request the appropriate modifications.

The library uses darklua to process its code.