Make the function signature less prominent, add an early example to docs
Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -8,15 +8,16 @@ layout: manual
|
||||
Compute the logarithm of the number with respect to an arbitrary base.
|
||||
|
||||
```kcl
|
||||
log(
|
||||
@input: number,
|
||||
base: number(_),
|
||||
): number
|
||||
```
|
||||
exampleSketch = startSketchOn(XZ)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(end = [log(100, base = 5), 0])
|
||||
|> line(end = [5, 8])
|
||||
|> line(end = [-10, 0])
|
||||
|> close()
|
||||
|
||||
The result might not be correctly rounded owing to implementation
|
||||
details; `log2` can produce more accurate results for base 2,
|
||||
and `log10` can produce more accurate results for base 10.
|
||||
example = extrude(exampleSketch, length = 5)
|
||||
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
@ -29,6 +30,20 @@ and `log10` can produce more accurate results for base 10.
|
||||
|
||||
[`number`](/docs/kcl-std/types/std-types-number) - A number.
|
||||
|
||||
### Description
|
||||
|
||||
The result might not be correctly rounded owing to implementation
|
||||
details; `log2` can produce more accurate results for base 2,
|
||||
and `log10` can produce more accurate results for base 10.
|
||||
|
||||
### Function signature
|
||||
|
||||
```kcl
|
||||
log(
|
||||
@input: number,
|
||||
base: number(_),
|
||||
): number
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
|
Reference in New Issue
Block a user