scribble-math/src
Martin von Gagern 397dcb303b Simplify stacked delimiters
Using a loop to determine the number of symbols we need is intuitive but
hardly efficient.  A Math.ceil in this situation is much better.

After that ceil or the loop that it replaced, the total height should be
equal to the minimal height plus an integral number times the height of the
repeat symbol.  That integer equals (half) number of loop iterations in the
original code, and the repeatCount variable in my new code.  So later on,
the quotient (repeatHeight / repeatHeightTotal) should be an integer, at
least up to numeric errors.  Applying ceil instead of round to that is
asking for these numeric errors to seriously break stuff.  Just reusing the
repeatCount is much simpler, shorter and more elegant.

Having distinct topSymbolCount and bottomSymbolCount seems pointless, since
the only reason why these could ever be different is due to the fact that
bottomRepeatHeight was computed using topHeightTotal, which looks like a
bug.  The old loop and new ceil assume a symmetric repeatCount.
2015-06-18 22:24:40 +02:00
..
buildCommon.js Add MathML rendering to improve accessibility 2015-03-01 18:33:20 -08:00
buildHTML.js Implement environments, for arrays and matrices in particular 2015-06-18 22:24:40 +02:00
buildMathML.js Implement environments, for arrays and matrices in particular 2015-06-18 22:24:40 +02:00
buildTree.js Add MathML rendering to improve accessibility 2015-03-01 18:33:20 -08:00
delimiter.js Simplify stacked delimiters 2015-06-18 22:24:40 +02:00
domTree.js Add MathML rendering to improve accessibility 2015-03-01 18:33:20 -08:00
environments.js Implement environments, for arrays and matrices in particular 2015-06-18 22:24:40 +02:00
fontMetrics.js Implement environments, for arrays and matrices in particular 2015-06-18 22:24:40 +02:00
functions.js Implement environments, for arrays and matrices in particular 2015-06-18 22:24:40 +02:00
Lexer.js Implement environments, for arrays and matrices in particular 2015-06-18 22:24:40 +02:00
mathMLTree.js Add MathML rendering to improve accessibility 2015-03-01 18:33:20 -08:00
Options.js Added new exercise colors as macros 2015-05-26 19:07:51 -07:00
parseData.js Implement environments, for arrays and matrices in particular 2015-06-18 22:24:40 +02:00
ParseError.js added position property to ParseError 2014-09-23 14:38:41 -06:00
Parser.js Implement environments, for arrays and matrices in particular 2015-06-18 22:24:40 +02:00
parseTree.js Add an optional settings argument to render calls 2015-02-19 15:26:57 -08:00
Settings.js Add an optional settings argument to render calls 2015-02-19 15:26:57 -08:00
Style.js Adds JSHint to the build system and tidies up code. 2014-10-01 21:28:46 -04:00
symbols.js Add \# and \& to AMS misc symbols 2015-03-30 10:14:29 -07:00
utils.js Adds JSHint to the build system and tidies up code. 2014-10-01 21:28:46 -04:00