Skip to content

Commit 4a67396

Browse files
committed
some documentation fixes
1 parent 23503fe commit 4a67396

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

runtime/scripts/jme-display.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ JMEDisplayer.prototype = {
973973
/** Display a complex decimal.
974974
*
975975
* @abstract
976-
* @param {decimal} n
976+
* @param {Numbas.math.ComplexDecimal} n
977977
* @param {Numbas.math.niceNumber_settings} options
978978
* @returns {*}
979979
* @see Numbas.jme.display.JMEDisplayer#decimal
@@ -984,7 +984,7 @@ JMEDisplayer.prototype = {
984984
/** Display a decimal as a fraction.
985985
*
986986
* @abstract
987-
* @param {decimal} n
987+
* @param {Decimal} n
988988
* @param {Numbas.math.niceNumber_settings} options
989989
* @returns {*}
990990
* @see Numbas.jme.display.JMEDisplayer#decimal
@@ -995,7 +995,7 @@ JMEDisplayer.prototype = {
995995
/** Display a decimal as a decimal.
996996
*
997997
* @abstract
998-
* @param {decimal} n
998+
* @param {Decimal} n
999999
* @param {Numbas.math.niceNumber_settings} options
10001000
* @returns {*}
10011001
* @see Numbas.jme.display.JMEDisplayer#decimal

runtime/scripts/math.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,8 @@ var math = Numbas.math = /** @lends Numbas.math */ {
11481148
/** Get the significand and exponent of a number written in exponential form.
11491149
*
11501150
* @param {string} str
1151-
* @returns {object} `{significand: number, exponent: number}`
1151+
* @param {boolean} [parse=true] - Parse the significand and exponent values to numbers, or leave them as strings?
1152+
* @returns {object} `{significand: number, exponent: number}` if `parse` is true, or `{significand: string, exponent: string}`
11521153
*/
11531154
parseScientific: function(str, parse) {
11541155
var m = /(-?\d[ \d]*(?:\.\d[ \d]*)?)e([\-+]?\d[ \d]*)/i.exec(str);

themes/default/files/scripts/mathjax.js

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ Numbas.queueScript('mathjax-hooks',['display-base','jme','jme-display'],function
33
return;
44
}
55

6+
/** Wrap a variable substitution inside `\simplify` with the `texify_simplify_subvar` function so it can be evaluated.
7+
*
8+
* @param {string} expr
9+
* @returns {string}
10+
*/
611
function wrap_subvar(expr) {
712
var sbits = Numbas.util.splitbrackets(expr,'{','}');
813
var out = '';

0 commit comments

Comments
 (0)