Updated a few of the API pages

This commit is contained in:
Ozzie Gooen 2022-06-05 22:16:29 -07:00
parent 441ac3c251
commit 18c14089c6
4 changed files with 150 additions and 126 deletions

View File

@ -4,49 +4,55 @@ title: Dictionary
--- ---
### toString ### toString
```javascript
(dict<a>):string
``` ```
toString: (dict<'a>) => string
```
### get ### get
```javascript
(dict<a>, string):a
``` ```
Dict.get: (dict<'a>, string) => a
```
### set ### set
```javascript
(dict<a>, string, a):a
``` ```
Dict.set: (dict<'a>, string, a) => a
```
### toPairs ### toPairs
```javascript
(dict<a>):list<list<string|a>>
``` ```
Dict.toPairs: (dict<'a>) => list<list<string|a>>
```
### keys ### keys
```javascript
(dict<a>):list<string>
``` ```
Dict.keys: (dict<'a>) => list<string>
```
### values ### values
```javascript
(dict<a>):list<a>
``` ```
Dict.values: (dict<'a>) => list<'a>
```
### merge ### merge
```javascript
(dict<a>, dict<b>):dict<a|b>
``` ```
Dict.merge: (dict<'a>, dict<'b>) => dict<'a|b>
```
### mergeMany ### mergeMany
```
```javascript Dict.mergeMany: (list<dict<'a>>) => dict<'a>
(list<dict<a>>):dict<a>
``` ```

View File

@ -3,20 +3,28 @@ sidebar_position: 3
title: Point Set Distribution title: Point Set Distribution
--- ---
### makeContinuous ### make
```javascript
(list<{x: number, y: number}>): pointSetDist
``` ```
PointSet.make: (distribution) => pointSetDist
```
### makeContinuous
```
PointSet.makeContinuous: (list<{x: number, y: number}>) => pointSetDist
```
### makeDiscrete ### makeDiscrete
```
```javascript PointSet.makeDiscrete: (list<{x: number, y: number}>) => pointSetDist
(list<{x: number, y: number}>): pointSetDist
``` ```
### map
```javascript
(pointSetDist, ({x:number,y:number}=>{x:number,y:number})):pointSetDist ### mapPoints
```
PointSet.mapPoints: (pointSetDist, ({x:number, y:number} => {x:number, y:number})) => pointSetDist
``` ```

View File

@ -4,79 +4,90 @@ title: Duration
--- ---
### toString ### toString
```javascript
(duration):string
``` ```
toString: (duration) => string
```
### minutes ### minutes
```javascript
(number):duration
``` ```
minutes: (number) => duration
```
### hours ### hours
```javascript
(number):duration
``` ```
hours: (number) => duration
```
### days ### days
```javascript
(number):duration
``` ```
days: (number) => duration
```
### years ### years
```javascript
(number):duration
``` ```
years: (number) => duration
```
### toHours ### toHours
```javascript
(duration):number
``` ```
Duration.toHours: (duration) => number
```
### toMinutes ### toMinutes
```javascript
(duration):number
``` ```
Duration.toMinutes: (duration) => number
```
### toDays ### toDays
```javascript
(duration):number
``` ```
Duration.toDays: (duration) => number
```
### toYears ### toYears
```javascript
(duration):number
``` ```
Duration.toYears: (duration) => number
```
### add ### add
```javascript
(duration, duration):duration
``` ```
add: (duration, duration) => duration
```
### subtract ### subtract
```javascript
(duration, duration):duration
``` ```
subtract: (duration, duration) => duration
```
### multiply ### multiply
```javascript
(duration, duration):duration
``` ```
multiply: (duration, duration) => duration
```
### divide ### divide
```
```javascript divide: (duration, duration) => duration
(duration, duration):duration
``` ```

View File

@ -4,87 +4,86 @@ title: Math
--- ---
### E ### E
Euler's number; ≈ 2.718281828459045
```javascript
number;
``` ```
Math.E:
```
Euler's number; ≈ 2.718281828459045Euler's number; ≈ 2.718281828459045
### LN2 ### LN2
Natural logarithm of 2; ≈ 0.6931471805599453
```javascript
number;
``` ```
Math.LN2:
```
Natural logarithm of 2; ≈ 0.6931471805599453Natural logarithm of 2; ≈ 0.6931471805599453
### LN10 ### LN10
Natural logarithm of 10; ≈ 2.302585092994046
```javascript
number;
``` ```
Math.LN10:
```
Natural logarithm of 10; ≈ 2.302585092994046Natural logarithm of 10; ≈ 2.302585092994046
### LOG2E ### LOG2E
Base 2 logarithm of E; ≈ 1.4426950408889634
```javascript
number;
``` ```
Math.LOG2E:
```
Base 2 logarithm of E; ≈ 1.4426950408889634Base 2 logarithm of E; ≈ 1.4426950408889634
### LOG10E ### LOG10E
Base 10 logarithm of E; ≈ 0.4342944819032518
```javascript
number;
``` ```
Math.LOG10E:
```
Base 10 logarithm of E; ≈ 0.4342944819032518Base 10 logarithm of E; ≈ 0.4342944819032518
### PI ### PI
Pi - ratio of the circumference to the diameter of a circle; ≈ 3.141592653589793
```javascript
number;
``` ```
Math.PI:
```
Pi - ratio of the circumference to the diameter of a circle; ≈ 3.141592653589793Pi - ratio of the circumference to the diameter of a circle; ≈ 3.141592653589793
### SQRT1_2 ### SQRT1_2
Square root of 1/2; ≈ 0.7071067811865476
```javascript
number;
``` ```
Math.SQRT1_2:
```
Square root of 1/2; ≈ 0.7071067811865476Square root of 1/2; ≈ 0.7071067811865476
### SQRT2 ### SQRT2
Square root of 2; ≈ 1.4142135623730951
```javascript
number;
``` ```
Math.SQRT2:
```
Square root of 2; ≈ 1.4142135623730951Square root of 2; ≈ 1.4142135623730951
### PHI ### PHI
Phi is the golden ratio. 1.618033988749895
```javascript
number;
``` ```
Math.PHI:
```
Phi is the golden ratio. 1.618033988749895Phi is the golden ratio. 1.618033988749895
### TAU ### TAU
Tau is the ratio constant of a circle's circumference to radius, equal to 2 \* pi. 6.283185307179586
```javascript
number;
``` ```
Math.TAU:
```
Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi. 6.283185307179586Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi. 6.283185307179586
### Infinity ### Infinity
```
```javascript Math.Infinity:
number;
``` ```