Skip to content

yss js functions mMath

Bartlomiej Ceglik edited this page Feb 19, 2023 · 3 revisions

mMath and string helper

mMath

To index

Functions

toDegrees(rad)number

function to radian to convert to degrees

toRad(angle)number

function to degrees to convert to radians

degToHdg(deg)String

function to get degrees to "001" 3 char str

mMapVal(val, minI, maxI, minO, maxO, inLimits)number

function to making map in range

storeIt(key, val, forMs, inLimits)

function to store data for later...

avgIt(key, forMs, toMs)number

function to avg it - to avg key value in storage

toDegrees(rad) ⇒ number

function to radian to convert to degrees

Kind: global function
Returns: number - - The degrees

Param Type Description
rad number The radian to convert to degrees

toRad(angle) ⇒ number

function to degrees to convert to radians

Kind: global function
Returns: number - - The radian

Param Type Description
angle number The degrees to convert to radian

degToHdg(deg) ⇒ String

function to get degrees to "001" 3 char str

Kind: global function
Returns: String - - The 3 char degrees "001"

Param Type Description
deg number The degrees

mMapVal(val, minI, maxI, minO, maxO, inLimits) ⇒ number

function to making map in range

Kind: global function
Returns: number - - The value with map set ..

Param Type Default Description
val number The value to convert
minI number The minimum on input
maxI number The maximum on input
minO number The minimum on output
maxO number The maximum on output
inLimits bool false = (def: false) - The maximum on output

storeIt(key, val, forMs, inLimits)

function to store data for later...

Kind: global function

Param Type Description
key number The key to identyfy this value
val number The value to store
forMs number The store for how many ms.
inLimits bool = (def: false) - The maximum on output

avgIt(key, forMs, toMs) ⇒ number

function to avg it - to avg key value in storage

Kind: global function
Returns: number - - The avg of key value ..

Param Type Description
key number The key to identyfy the value in storage
forMs number The ms of sample to avg
toMs number The ms o point
Clone this wiki locally