Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tmhglnd committed Nov 29, 2021
1 parent 34bd31c commit 57efbaf
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
18 changes: 9 additions & 9 deletions docs/generative-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Gen.spread(5, 12, 3);
// generate an array of 5 floats between range 0-1
Gen.spreadFloat(5);
//=> [ 0, 0.2, 0.4, 0.6, 0.8 ]
// Alternative: Gen.spreadF()
// Alias: Gen.spreadF()

```

Expand All @@ -69,7 +69,7 @@ Generate an array of n-length of evenly spaced values between a starting number
// generate an array of 5 ints between range 0-5 (5 inclusive)
Gen.spreadInclusive(5);
//=> [ 0, 1, 2, 3, 5 ]
// Alternative: Gen.spreadInc()
// Alias: Gen.spreadInc()

// change the range with a second argument to 0-12
Gen.spreadInclusive(5, 12);
Expand All @@ -86,7 +86,7 @@ Gen.spreadInclusive(5, 12, 3);
// generate an array of 5 floats (inclusive)
Gen.spreadInclusiveFloat(5);
//=> [ 0, 0.25, 0.5, 0.75, 1 ]
// Alternative: Gen.spreadIncF()
// Alias: Gen.spreadIncF()

```

Expand All @@ -108,7 +108,7 @@ Gen.spreadExp(10, 0, 10, 2);
// ]

Gen.spreadExpFloat();
// Alternative: Gen.spreadExpF()
// Alias: Gen.spreadExpF()
```

## spreadInclusiveExp
Expand All @@ -129,7 +129,7 @@ Gen.spreadInclusiveExp(10, 0, 10, 2);
// ]

Gen.spreadInclusiveExpFloat();
// Alternative: Gen.spreadIncExpF()
// Alias: Gen.spreadIncExpF()
```

## fill
Expand Down Expand Up @@ -243,7 +243,7 @@ Gen.sineFloat(40, Gen.sineFloat(40, 4, 1, 5));
// -0.80 ┤ ││ ││ ╰╯ │ │╰╯│ │ ╰─╯ │
// -1.00 ┤ ╰╯ ╰╯ ╰─╯ ╰─╯ ╰

// Alternative: Gen.sinF(), Gen.cosF()
// Alias: Gen.sinF(), Gen.cosF()
```

<iframe src="https://editor.p5js.org/tmhglnd/embed/CFOwE1yhW" width="100%" height="250px" frameBorder="0" scrolling="no"></iframe>
Expand Down Expand Up @@ -297,7 +297,7 @@ Gen.saw(34, Gen.sinF(30, 2, 0, 100), 0, 12);
// 1.00 ┤ ╭╯ ││ ╰╯ │╭╯ │ │ ╰─╮│
// 0.00 ┼─╯ ╰╯ ╰╯ ╰─╯ ╰╯

// Alternative: Gen.sawF()
// Alias: Gen.sawF()
```

## square / squareFloat
Expand All @@ -321,7 +321,7 @@ Gen.square(30, 4, 0, 1, 0.2);
//=> 1.00 ┼─╮ ╭─╮ ╭─╮ ╭╮
// 0.00 ┤ ╰─────╯ ╰────╯ ╰─────╯╰─────

// Alternative: Gen.rect()
// Alias: Gen.rect()

// Frequency Modulation with Gen.sin
Gen.squareFloat(30, Gen.sinF(30, 2, 1, 5));
Expand All @@ -332,6 +332,6 @@ Gen.squareFloat(30, Gen.sinF(30, 2, 1, 5));
// 0.20 ┤ │ │ ││ │ │ │ │ │ │
// 0.00 ┤ ╰─────╯ ╰╯ ╰─╯ ╰──╯ ╰─╯

// Alternative: Gen.squareF(), Gen.rectFloat(), Gen.rectF()
// Alias: Gen.squareF(), Gen.rectFloat(), Gen.rectF()

```
10 changes: 5 additions & 5 deletions docs/statistic-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Stat.average([1, 2, 3, 4, 5, 6, 7, 8, 9]);
Stat.average([2, -6, 2, 0, 10, 9, -2, 5, -8, -11, 1, -3]);
//=> -0.0833

// Alternative: Stat.mean()
// Alias: Stat.mean()
```

## center
Expand All @@ -73,7 +73,7 @@ Stat.center([1, 5, 6, 9, 13]);
Stat.center([1, 7, 4, 2, 9, 5]);
//=> 4.5

// Alternative: Stat.median()
// Alias: Stat.median()
```

## common
Expand All @@ -95,7 +95,7 @@ Stat.common([8, [4, 3], 9, [9, 0, [2, 10], 5], 11, 0, 11]);
Stat.common([8, 4, 3, 9, 9, 0, 2, 10, 5, 11, 0, 11]);
//=> [ 0, 9, 11 ]

// Alternative: Stat.mode()
// Alias: Stat.mode()
```

## minimum
Expand All @@ -110,7 +110,7 @@ Util.minimum([-38, -53, -6, 33, 88, 32, -8, 73]);
Stat.minimum([-38, [-53, [-6, 33], 88, 32], [-8, 73]]);
//=> -53

// Alternative: Util.min()
// Alias: Util.min()
```

## maximum
Expand All @@ -125,7 +125,7 @@ Util.maximum([-38, -53, -6, 33, 88, 32, -8, 73]);
Stat.maximum([-38, [-53, [-6, 33], 88, 32], [-8, 73]]);
//=> 88

// Alternative: Util.max()
// Alias: Util.max()
```

## change
Expand Down
2 changes: 1 addition & 1 deletion docs/stochastic-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Generate a ring of random integers between a specified range (excluding high val
// generate an array of random floats in range -1 to 1
Rand.randomFloat(3, -1, 1);
//=> [ 0.6291111850577886, 0.15153786227276944, 0.32814801081039646 ]
// Alternative Rand.randomF();
// Alias Rand.randomF();

// generate an array of random integers in range
Rand.random(5, 0, 12);
Expand Down
10 changes: 5 additions & 5 deletions docs/transform-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Mod.join([0, 5], [[12, 19], 7]);
Mod.join(['c4', 'e4'], ['g4', 'f4']);
//=> [ 'c4', 'e4', 'g4', 'f4' ]

// Alternative: Mod.combine()
// Alias: Mod.combine()
```

<!-- <iframe src="https://editor.p5js.org/tmhglnd/embed/oDCkLCUta" width="100%" height="250px" frameBorder="0" scrolling="no"></iframe> -->
Expand All @@ -104,7 +104,7 @@ Mod.copy([0, [3, 7], 12], 2);
Mod.copy(['c', 'f', 'g'], 3);
//=> [ 'c', 'f', 'g', 'c', 'f', 'g', 'c', 'f', 'g' ]

// Alternative: Mod.duplicate(), Mod.dup()
// Alias: Mod.duplicate(), Mod.dup()
```

<!-- <iframe src="https://editor.p5js.org/tmhglnd/embed/5n5e03e4M" width="100%" height="250px" frameBorder="0" scrolling="no"></iframe> -->
Expand Down Expand Up @@ -209,7 +209,7 @@ Mod.filterType([0, 'foo', {bar : true}, 1, undefined]);
Mod.filterType([0, 1, [1, 2], 'foo', 2, null, true, {bar: 5}, 3.14, undefined], 'number');
//=> [ 0, 1, 2, 3.14 ]

// Alternative: Mod.tFilter()
// Alias: Mod.tFilter()
```

## invert
Expand Down Expand Up @@ -261,7 +261,7 @@ Mod.lace([0, [0, 0]], [[7,7]], [9, [9, 9], 9]);
Mod.lace(['c', 'c', 'c', 'c'], ['g', 'g'], ['e']);
//=> [ 'c', 'g', 'e', 'c', 'g', 'c', 'c' ]

// Alternative: Mod.zip()
// Alias: Mod.zip()
```

## lookup
Expand Down Expand Up @@ -333,7 +333,7 @@ Mod.palindrome([0, [5, 7], 9, 12], true);
Mod.palindrome(['c4', 'f4', 'g4'], true);
//=> [ 'c4', 'f4', 'g4', 'f4' ]

// Alternative: Mod.mirror()
// Alias: Mod.mirror()
```

## repeat
Expand Down

0 comments on commit 57efbaf

Please sign in to comment.