- PID
PID controller
- copyArray ⇒
Array
Copy array
- shuffleArray ⇒
Array
Shuffle array
- filterUnique ⇒
Array
Filter array unique
- fuzzySearch ⇒
Array
Fuzzy search element in list
- contains ⇒
boolean
Check if array contains
- lerpColor ⇒
String
Linear color interpolation
- getQuarter ⇒
Array
Get quarter from date
- quarterExtent ⇒
Array
Get quarter extent
- datesBetween ⇒
Array
Get all dates between two dates
- lerp3 ⇒
Point
Linear interpolation in 3D
- lerpStops ⇒
Array.<Point>
Linear interpolation in 3D array
- dist ⇒
Number
Distance between two points (2D and 3D)
- intersectLines ⇒
Point
|Boolean
Find intersection point between two lines
- intersectCircles ⇒
Array
|Boolean
Find intersection points between two circles
- polarToCartesian ⇒
Point
Convert coordinates from polar to cartesian
- cartesianToPolar ⇒
Object
Convert coordinates from cartesian to polar
- dist2 ⇒
Number
Distance between two points (2D and 3D) squared
- distToSegment2 ⇒
Number
Distance between point and segment squared
- distToSegment ⇒
Number
Distance between point and segment
- map ⇒
Number
Map a number from one range to another
- clamp ⇒
Number
Clamp a number to range
- norm ⇒
Number
Normalize a number
- lerp ⇒
Number
Linear interpolation
- square ⇒
Number
Square
- degrees ⇒
Number
Convert angle in radians to degrees
- radians ⇒
Number
Convert angle in degrees to radians
- precision ⇒
Number
Round number to precision
- shallowCopyExcluding ⇒
Object
Copy object excluding property
- random ⇒
Number
Generate random number from range
- randomDir ⇒
Number
Generate random direction (-1 or 1)
- randomIndex ⇒
Number
Generate random index
- randomName ⇒
String
Generate random name
- timestampName ⇒
String
Generate timestamp name
- removeDiacritics ⇒
String
Remove polish diacritics
- removeNonAlphaNumeric ⇒
String
Remove all non alphanumeric characters
- splitChunks ⇒
Array
Split string to N sized chunks
- sepCase ⇒
string
Convert string to custom separator case
- snakeCase ⇒
string
Convert string to snake case
- kebabCase ⇒
string
Convert string to kebab case
- camelCase ⇒
string
Convert string to camel case
PID controller
- PID
- .set(P, I, D)
- .update(current, target) ⇒
number
Set PID gains
Kind: instance method of PID
Params
- P
number
= 0
- Proportional Gain - I
number
= 0
- Integral Gain - D
number
= 0
- Derivative Gain
Update PID controller
Kind: instance method of PID
Returns: number
- Output value
Params
- current
number
- Current value - target
number
- Target value
Copy array
Kind: global constant
Returns: Array
- copy of the array
Params
- source
Array
- source array
Shuffle array
Kind: global constant
Returns: Array
- shuffled array copy
Params
- source
Array
- source array
Filter array unique
Kind: global constant
Returns: Array
- array with unique elements only
Params
- source
Array
- source array
Fuzzy search element in list
Kind: global constant
Returns: Array
- elements matching search value
Params
- list
Array
- Array of terms - searchValue
String
- search value to find
Check if array contains
Kind: global constant
Returns: boolean
- - true when element is in array
Params
- elem
any
- element to find in array - arr
Array
- array to look in
Linear color interpolation
Kind: global constant
Returns: String
- Interpolated color
Params
- a
String
- First color - b
String
- Second color - amt
Number
- amount to interpolate
Get quarter from date
Kind: global constant
Returns: Array
- year and quarter (1-4)
Params
- d
Date
- Date to get quarter from
Get quarter extent
Kind: global constant
Returns: Array
- start and end date of quarter
Params
- quarter
Number
- quarter (1-4) - year
Number
- full year
Get all dates between two dates
Kind: global constant
Returns: Array
- all dates between start and end
Params
- start
Date
- start date - end
Date
- end date
lerp3 ⇒ Point
Linear interpolation in 3D
Kind: global constant
Returns: Point
- Interpolated point
Params
lerpStops ⇒ Array.<Point>
Linear interpolation in 3D array
Kind: global constant
Returns: Array.<Point>
- Interpolated points
Params
Distance between two points (2D and 3D)
Kind: global constant
Returns: Number
- distance between the points
Params
intersectLines ⇒ Point
| Boolean
Find intersection point between two lines
Kind: global constant
Returns: Point
| Boolean
- intersection or false (if no intersection)
Params
- p1
Point
- first point of first line - p2
Point
- second point of first line - p3
Point
- first point of second line - p4
Point
- second point of second line
Find intersection points between two circles
Kind: global constant
Returns: Array
| Boolean
- intersection or false (if no intersection)
Params
polarToCartesian ⇒ Point
Convert coordinates from polar to cartesian
Kind: global constant
Returns: Point
- cartesian coordinates
Params
- r
Number
- radius - angle
Number
- angle
Convert coordinates from cartesian to polar
Kind: global constant
Returns: Object
- polar coordinates
Params
- P
Point
- cartesian coordinates
Distance between two points (2D and 3D) squared
Kind: global constant
Returns: Number
- squared distance between the points
Params
Distance between point and segment squared
Kind: global constant
Returns: Number
- squared distance between the point and the segment
Params
Distance between point and segment
Kind: global constant
Returns: Number
- distance between the point and the segment
Params
Map a number from one range to another
Kind: global constant
Returns: Number
- Mapped number
Params
- value
Number
- Number to map - low1
Number
- Source range lower bound - high1
Number
- Source range upper bound - low2
Number
- Target range lower bound - high2
Number
- Target range upper bound
Clamp a number to range
Kind: global constant
Returns: Number
- Clamped number
Params
- value
Number
- Number to clamp - min
Number
- Range lower bound - max
Number
- Range upper bound
Normalize a number
Kind: global constant
Returns: Number
- normalized number (0.0 - 1.0)
Params
- value
Number
- value to normalize - start
Number
- Source range lower bound - stop
Number
- Source range upper bound
Linear interpolation
Kind: global constant
Returns: Number
- Interpolated value
Params
- start
Number
- First value - stop
Number
- Second value - amt
Number
- amount to interpolate
Square
Kind: global constant
Returns: Number
- squared number
Params
- a
Number
- Number to square
Convert angle in radians to degrees
Kind: global constant
Returns: Number
- angle in degrees
Params
- radians
Number
- angle in radians
Convert angle in degrees to radians
Kind: global constant
Returns: Number
- angle in radians
Params
- degrees
Number
- angle in degrees
Round number to precision
Kind: global constant
Returns: Number
- rounded number
Params
- value
Number
- value to round - precision
Number
- decimal places
Copy object excluding property
Kind: global constant
Returns: Object
- - copied object
Params
- obj
Object
- Object to copy - prop
string
- property name
Generate random number from range
Kind: global constant
Returns: Number
- Random number
Params
- [low]
Number
- Range lower bound - high
Number
- Range upper bound
Generate random direction (-1 or 1)
Kind: global constant
Returns: Number
- Random direction
Generate random index
Kind: global constant
Returns: Number
- random index
Params
- N
Number
- max index
Generate random name
Kind: global constant
Returns: String
- random name
Params
- N
Number
- length of the name
Generate timestamp name
Kind: global constant
Returns: String
- timestamp name
Remove polish diacritics
Kind: global constant
Returns: String
- string without diacritics
Params
- str
String
- string with diacritics
Remove all non alphanumeric characters
Kind: global constant
Returns: String
- string without non alphanumeric characters
Params
- str
String
- string with non alphanumeric characters
Split string to N sized chunks
Kind: global constant
Returns: Array
- array of string chunks
Params
- str
String
- string to split - n
Number
- chunk length - discard
Boolean
- discard chunks shorter than N
Convert string to custom separator case
Kind: global constant
Returns: string
- custom cased string
Params
- str
string
- string to convert
Convert string to snake case
Kind: global constant
Returns: string
- snake cased string
Params
- str
string
- string to convert
Convert string to kebab case
Kind: global constant
Returns: string
- kebab cased string
Params
- str
string
- string to convert
Convert string to camel case
Kind: global constant
Returns: string
- camel cased string
Params
- str
string
- string to convert
Kind: global typedef
Properties
- x
Number
- x coordinate - y
Number
- y coordinate - z
Number
- z coordinate
Kind: global typedef
Properties
- x
Number
- x coordinate of the center point - y
Number
- y coordinate of the center point - r
Number
- radius
Copyright © 2024 panGenerator