lndsld

Home > @lndsld/math

math package

A library with math utilities

Classes

Class Description
MVector2 Mutable version of two-dimensional vector

Functions

Function Description
clamp(range) Clamp value in range
clamp(min, max)  
interpolate(valueRange, targetRange) Interpolates value from one range to another
moveToTarget(targetValue)  
random(range) Returns random value from specified range
random(min, max)  
roundBy(digits) Round float number with specified accuracy

Interfaces

Interface Description
Vector2 Abstract interface for two-dimensional vector

Namespaces

Namespace Description
IRange2  
IVector2  

Variables

Variable Description
IRange2  
IVector2  

Type Aliases

Type Alias Description
IRange2 Immutable version of number rangeRepresents [from, to] range
IVector2 Immutable version of two-dimensional vector