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:
- - 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 @@