From 18b04bb6d42679900911271628b48b08afbc7168 Mon Sep 17 00:00:00 2001 From: Roman Dvornov Date: Tue, 14 May 2024 02:47:42 +0200 Subject: [PATCH] Fix links to methods & examples --- docs/articles/methods-builtin.md | 10 +++++----- docs/discovery/data.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/articles/methods-builtin.md b/docs/articles/methods-builtin.md index dcd5708..57173de 100644 --- a/docs/articles/methods-builtin.md +++ b/docs/articles/methods-builtin.md @@ -295,7 +295,7 @@ $input.max(a desc) ## median() -Computes the [median](https://en.wikipedia.org/wiki/Median) (the second [quartile](https://en.wikipedia.org/wiki/Quartile)) of the values in an array. It's a shortcut for `percentile(50)` or `p(50)` (see [percentile()](#percentilevalue-getter)). +Computes the [median](https://en.wikipedia.org/wiki/Median) (the second [quartile](https://en.wikipedia.org/wiki/Quartile)) of the values in an array. It's a shortcut for `percentile(50)` or `p(50)` (see [percentile()](#percentile)). ```jora [4, 2, 1, 3, 5].median() @@ -358,11 +358,11 @@ The `numbers()` method is utilized internally by statistical methods such as `su ## p() -Alias for [`percentile()`](#percentilek-getter) method. +Alias for [`percentile()`](#percentile) method. ## percentile() -This function computes the [percentile](https://en.wikipedia.org/wiki/Percentile) of values in an array. It returns `undefined` if the input is an empty array, not an array, or if the `k` parameter is not specified or falls outside the range of `[0..100]`. The function utilizes the same numbers as the [`numbers()`](#numbersgetter) method, given the same `getter` parameter. If the input (after processing through `getter`) contains a `NaN`, the function will always return `NaN`. +This function computes the [percentile](https://en.wikipedia.org/wiki/Percentile) of values in an array. It returns `undefined` if the input is an empty array, not an array, or if the `k` parameter is not specified or falls outside the range of `[0..100]`. The function utilizes the same numbers as the [`numbers()`](#numbers) method, given the same `getter` parameter. If the input (after processing through `getter`) contains a `NaN`, the function will always return `NaN`. ```jora [4, 3, 5, 2, 1].percentile(75) @@ -499,7 +499,7 @@ Returns the [standard deviation](https://en.wikipedia.org/wiki/Standard_deviatio ## sum() -Computes the sum of the values in an array. It returns `undefined` for non-array values and empty arrays. The method uses the same numbers as [`numbers()`](#numbersgetter) method with the same `getter` parameter returns. The method employs the [Kahan–Babuška summation algorithm](https://en.wikipedia.org/wiki/Kahan_summation_algorithm) to minimize numerical errors in the result. +Computes the sum of the values in an array. It returns `undefined` for non-array values and empty arrays. The method uses the same numbers as [`numbers()`](#numbers) method with the same `getter` parameter returns. The method employs the [Kahan–Babuška summation algorithm](https://en.wikipedia.org/wiki/Kahan_summation_algorithm) to minimize numerical errors in the result. ```jora [].sum() @@ -596,7 +596,7 @@ JavaScript's [`Math`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Re Modifications from the standard JavaScript `Math` object include: - The `log()` and `log1p()` methods have been renamed to `ln()` and `ln1p()`, respectively. This change was made to prevent confusion with the common usage of `log()` for logging purposes. -- The [`min()`](#mincompare) and [`max()`](#maxcompare) methods have been uniquely implemented in Jora to provide additional functionality. +- The [`min()`](#min) and [`max()`](#max) methods have been uniquely implemented in Jora to provide additional functionality. - The `random()` method is not included in Jora's Math methods, as it does not align with the deterministic nature of Jora. > Note: Keep in mind that the unary `-` operator has lower precedence than other operators. To apply a method to a negative scalar number, use the [grouping operator](./operators.md#grouping-operator), the [pipeline operator](./operators.md#pipeline-operator), or store the number in a [variable](./variables.md) and then apply the method to it. For example, instead of `-123.abs()`, which is interpreted as `-(123.abs())`, you should use one of the following: diff --git a/docs/discovery/data.js b/docs/discovery/data.js index ee10529..a9dd0c5 100644 --- a/docs/discovery/data.js +++ b/docs/discovery/data.js @@ -99,7 +99,7 @@ function processMarkdown(article, href, { examples, methods }) { examples.push({ article, - header: lastHeader, + header: lastHeader.replace(//g, ''), methodRefs, source: token.text, ast