Skip to content

Commit

Permalink
toLaTeX: use texifier.number for coefficient and degree
Browse files Browse the repository at this point in the history
  • Loading branch information
christianp committed Jan 30, 2024
1 parent 03de08e commit ea87980
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions polynomials.js
Expand Up @@ -67,8 +67,8 @@ Numbas.addExtension('polynomials',['jme','jme-display'],function(extension) {
texifier = new Numbas.jme.display.Texifier();
}
this.ordered_coefficients.map(function(bit,i){
var d = Numbas.math.niceNumber(bit.degree);
var c = Numbas.math.niceNumber(Math.abs(bit.coefficient));
var d = texifier.number(bit.degree);
var c = texifier.number(Math.abs(bit.coefficient));
if(i>0) {
out += bit.coefficient>0 ? ' + ' : ' - ';
} else {
Expand Down

0 comments on commit ea87980

Please sign in to comment.