init({
range: [ [-1, 11], [-1, 1] ]
});
var start = 0;
var end = 10;
var originX = 0;
var x = ABSOLUTE_NUMBER;
if ( SIGN === "-" ) {
start = -10;
end = 0;
originX = 10;
x = 10 - x;
}
numberLine( start, end );
style({ stroke: BLUE, fill: BLUE });
graph.pt = circle( [ x, 0 ], 0.15 );
style({ stroke: ORANGE, fill: ORANGE, strokeWidth: 3.5, arrows: "->" });
path( [ [ originX, 0 ], [ x, 0 ] ] );
circle( [ originX, 0 ], 0.10 );
graph.pt.toFront();
The distance from 0
to commafy(NUMBER)
is commafy(ABSOLUTE_NUMBER)
, which equals the absolute value.
In other words, commafy(ABSOLUTE_NUMBER)
is the non-negative version of commafy(NUMBER)
.