From 9a4041e8f6d48bec8358366e2e30e908799a7aeb Mon Sep 17 00:00:00 2001 From: Jos de Jong Date: Tue, 29 Mar 2022 09:17:36 +0200 Subject: [PATCH] Publish mathjs@10.4.2 --- docs/datatypes/units.md | 4 +-- docs/reference/functions/format.md | 3 ++ download.md | 6 ++-- examples/browser/angle_configuration.html | 2 +- examples/browser/angle_configuration.html.md | 2 +- examples/browser/basic_usage.html | 2 +- examples/browser/basic_usage.html.md | 2 +- examples/browser/currency_conversion.html | 2 +- examples/browser/currency_conversion.html.md | 2 +- examples/browser/custom_separators.html | 2 +- examples/browser/custom_separators.html.md | 2 +- examples/browser/plot.html | 2 +- examples/browser/plot.html.md | 2 +- .../browser/pretty_printing_with_mathjax.html | 2 +- .../pretty_printing_with_mathjax.html.md | 2 +- examples/browser/printing_html.html | 2 +- examples/browser/printing_html.html.md | 2 +- examples/browser/requirejs_loading.html | 2 +- examples/browser/requirejs_loading.html.md | 2 +- .../rocket_trajectory_optimization.html | 2 +- .../rocket_trajectory_optimization.html.md | 2 +- examples/browser/webworkers/index.md | 2 +- examples/browser/webworkers/worker.js | 2 +- history.md | 17 +++++++++++ js/lib/math.js | 12 ++++---- js/lib/math.js.map | 2 +- package-lock.json | 30 +++++++++---------- package.json | 2 +- 28 files changed, 68 insertions(+), 48 deletions(-) diff --git a/docs/datatypes/units.md b/docs/datatypes/units.md index 73f87f80e..8badce9ec 100644 --- a/docs/datatypes/units.md +++ b/docs/datatypes/units.md @@ -93,7 +93,7 @@ const F = math.multiply(q, math.cross(v, B)) // [0 N, 0 N, -1 N] All arithmetic operators act on the value of the unit as it is represented in SI units. This may lead to surprising behavior when working with temperature scales like `celsius` (or `degC`) and `fahrenheit` (or `degF`). -In general you should avoid calculations using `celsius` and `fahrenheit`. Rather, use `kelvin` (or `K`) and `rankine` (or `R`) instead. +In general you should avoid calculations using `celsius` and `fahrenheit`. Rather, use `kelvin` (or `K`) and `rankine` (or `degR`) instead. This example highlights some problems when using `celsius` and `fahrenheit` in calculations: ```js @@ -139,7 +139,7 @@ An optional `options` object can also be supplied as the last argument to `creat ```js // Redefine the mile (would not be the first time in history) -math.createUnit('mile', '1609.347218694', {override: true}}) +math.createUnit('mile', '1609.347218694 m', {override: true}) ``` Base units created without specifying a definition cannot be overridden. diff --git a/docs/reference/functions/format.md b/docs/reference/functions/format.md index c04ff481b..b4ff06cc3 100644 --- a/docs/reference/functions/format.md +++ b/docs/reference/functions/format.md @@ -71,6 +71,9 @@ math.format(value, callback) - `fraction: string`. Available values: 'ratio' (default) or 'decimal'. For example `format(fraction(1, 3))` will output '1/3' when 'ratio' is configured, and will output `0.(3)` when 'decimal' is configured. + - `truncate: number`. Specifies the maximum allowed length of the + returned string. If it would have been longer, the excess characters + are deleted and replaced with `'...'`. - `callback: function` A custom formatting function, invoked for all numeric elements in `value`, for example all elements of a matrix, or the real and imaginary diff --git a/download.md b/download.md index 7116066bb..06ef4ef4f 100644 --- a/download.md +++ b/download.md @@ -27,7 +27,7 @@ Math.js can be downloaded or linked from various content delivery networks: unpkg - https://unpkg.com/mathjs@10.4.1/ + https://unpkg.com/mathjs@10.4.2/ cdnjs @@ -47,8 +47,8 @@ Math.js can be downloaded or linked from various content delivery networks: Or download the full bundle directly from [unpkg](https://unpkg.com):

- - math.js (version 10.4.1, 177 kB, minified and gzipped) + + math.js (version 10.4.2, 178 kB, minified and gzipped)

diff --git a/examples/browser/angle_configuration.html b/examples/browser/angle_configuration.html index 4643b17b0..4c8192b51 100644 --- a/examples/browser/angle_configuration.html +++ b/examples/browser/angle_configuration.html @@ -15,7 +15,7 @@ } - + diff --git a/examples/browser/angle_configuration.html.md b/examples/browser/angle_configuration.html.md index a8a327bea..6c9224333 100644 --- a/examples/browser/angle_configuration.html.md +++ b/examples/browser/angle_configuration.html.md @@ -24,7 +24,7 @@ File: [angle_configuration.html](angle_configuration.html) (click for a live dem } - + diff --git a/examples/browser/basic_usage.html b/examples/browser/basic_usage.html index a00ff1f55..6aabe1cb8 100644 --- a/examples/browser/basic_usage.html +++ b/examples/browser/basic_usage.html @@ -3,7 +3,7 @@ math.js | basic usage - + diff --git a/examples/browser/basic_usage.html.md b/examples/browser/basic_usage.html.md index 7717dec2c..46654ef2e 100644 --- a/examples/browser/basic_usage.html.md +++ b/examples/browser/basic_usage.html.md @@ -12,7 +12,7 @@ File: [basic_usage.html](basic_usage.html) (click for a live demo) math.js | basic usage - + diff --git a/examples/browser/currency_conversion.html b/examples/browser/currency_conversion.html index 97bc6da06..dad06c969 100644 --- a/examples/browser/currency_conversion.html +++ b/examples/browser/currency_conversion.html @@ -4,7 +4,7 @@ math.js | currency conversion - + - + diff --git a/examples/browser/custom_separators.html.md b/examples/browser/custom_separators.html.md index 50795a492..c24dc64bf 100644 --- a/examples/browser/custom_separators.html.md +++ b/examples/browser/custom_separators.html.md @@ -24,7 +24,7 @@ File: [custom_separators.html](custom_separators.html) (click for a live demo) } - + diff --git a/examples/browser/plot.html b/examples/browser/plot.html index fe6612335..ed7003d39 100644 --- a/examples/browser/plot.html +++ b/examples/browser/plot.html @@ -3,7 +3,7 @@ math.js | plot - + diff --git a/examples/browser/plot.html.md b/examples/browser/plot.html.md index 70bf25571..f754aab9f 100644 --- a/examples/browser/plot.html.md +++ b/examples/browser/plot.html.md @@ -12,7 +12,7 @@ File: [plot.html](plot.html) (click for a live demo) math.js | plot - + diff --git a/examples/browser/pretty_printing_with_mathjax.html b/examples/browser/pretty_printing_with_mathjax.html index b8c0b0511..c352d47db 100644 --- a/examples/browser/pretty_printing_with_mathjax.html +++ b/examples/browser/pretty_printing_with_mathjax.html @@ -4,7 +4,7 @@ math.js | pretty printing with MathJax - + diff --git a/examples/browser/pretty_printing_with_mathjax.html.md b/examples/browser/pretty_printing_with_mathjax.html.md index e4650f2e8..e6b5c27a1 100644 --- a/examples/browser/pretty_printing_with_mathjax.html.md +++ b/examples/browser/pretty_printing_with_mathjax.html.md @@ -13,7 +13,7 @@ File: [pretty_printing_with_mathjax.html](pretty_printing_with_mathjax.html) (cl math.js | pretty printing with MathJax - + diff --git a/examples/browser/printing_html.html b/examples/browser/printing_html.html index 901e1ed44..5c11d1a5a 100644 --- a/examples/browser/printing_html.html +++ b/examples/browser/printing_html.html @@ -4,7 +4,7 @@ math.js | printing HTML - +