jos
349e9845e8
Merge branch 'develop' into v2_merge
...
Conflicts:
HISTORY.md
bower.json
component.json
dist/math.js
dist/math.map
dist/math.min.js
docs/reference/units.md
lib/version.js
package.json
test/function/construction/chain.test.js
test/function/matrix/det.test.js
test/function/matrix/transpose.test.js
test/function/utils/import.test.js
2015-04-13 21:42:43 +02:00
Jos de Jong
bc6f63b6c9
Merge pull request #318 from FSMaxB/latex-restructure
...
Restructure and complete the LaTeX generator.
2015-04-13 09:39:16 +02:00
jos
3150e21c8e
Fixed #313 : parsed functions did not handle recursive calls correctly
2015-04-09 20:29:51 +02:00
Max Bruckner
dacf9fba46
OperatorNode: bugfix: toTex creates invalid LaTeX
...
toTex has been creating invalid LaTeX for fractions where the operands
are in parenthesis, see '(1+1)/2' for example
2015-04-05 14:29:15 +02:00
Max Bruckner
671734f215
util/latex: Use function names as keys for map of operators
2015-04-05 14:29:14 +02:00
Max Bruckner
0868987cdf
util/latex: use ":=" for assignments and '=' 'equal'
2015-04-05 14:29:14 +02:00
Max Bruckner
e536af8328
OperatorNode: get rid of util/latex's toFunction
2015-04-05 14:29:13 +02:00
Max Bruckner
0772a1fb81
util/latex: Get rid of toUnit ( hasn't been working anyway )
2015-04-05 14:29:12 +02:00
Max Bruckner
6b1d09f2cb
util/latex: new toSymbol
2015-04-05 14:29:12 +02:00
Max Bruckner
e160efbb66
util/latex: get rid of the toOperator function
2015-04-05 14:29:11 +02:00
Max Bruckner
5dcb87aeaa
util/latex: Remove unused functions
...
* toArgs
* addBraces
* dots and curly functions
util/latex.js: Remove Function addBraces
util/latex.js remove dots and curly functions
2015-04-05 14:29:09 +02:00
Max Bruckner
13e35217b7
Latex restructure
2015-04-05 14:25:54 +02:00
jos
8a68bb56e4
Merged math.js v1.5 into v2. Format support of functions eye and diag still needs to be fixed
2015-03-31 22:07:47 +02:00
jos
5cab0641e9
Simplified the factory structure a little bit. Reworked reviver and BigNumber to factories
2015-03-26 21:03:55 +01:00
Rogelio J. Baucells
0d34992080
Merge pull request #23 from josdejong/develop
...
Sync
2015-03-19 00:06:26 -04:00
Max Bruckner
e04dfd26bc
Rename customFuncions to callbacks
2015-03-17 18:30:26 +01:00
Max Bruckner
47f76f35ac
Limit custom toTex with multiple callbacks to FunctionNodes
...
Now only FunctionNode's toTex can be overwritten mit a map of callbacks
2015-03-17 18:14:14 +01:00
Max Bruckner
a973482ef2
Fix bug in fix of breaking change
...
Without this fix, the type passed to ArrayNode.toTex would stay there
forever until you change it back manually instead of being used only
once.
2015-03-14 09:09:07 +01:00
Max Bruckner
af763aa996
Fix breaking change (Node.toTex should return an empty string)
2015-03-13 21:23:14 +01:00
Max Bruckner
c9d20285e9
Fix breaking change ( passing type to ArrayNode.toTex )
2015-03-13 21:23:14 +01:00
Max Bruckner
0fee9173c8
Enable custom toTex functions
2015-03-13 21:23:14 +01:00
Max Bruckner
35ce7f7fb4
Make Node.toTex a wrapper like Node.compile
...
Node.prototype.toTex is now a wrapper that calls the node's _toTex
2015-03-13 21:23:14 +01:00
Max Bruckner
37c1363c2d
Pass callbacks to toTex functions
2015-03-13 21:23:13 +01:00
Rogelio J. Baucells
b4463d9ef3
Initial require() changes
2015-03-04 13:53:32 -05:00
Max Bruckner
6a9c2df38c
Update FunctionAssignmentNode to better handle parenthesis
2015-03-01 17:10:09 +01:00
Max Bruckner
bb2bfc939c
Update AssignmentNode to better handle parenthesis
2015-03-01 17:02:42 +01:00
Max Bruckner
b2d868c2ed
Update OperatorNode's toTex to better handle parens
...
Use the new infrastructure in OperatorNode's toTex
2015-03-01 16:34:09 +01:00
Max Bruckner
b5ce799e9d
New generic toString for AssignmentNode
2015-03-01 10:35:04 +01:00
Max Bruckner
1f2f42012c
New generic toString for FunctionAssignmentNode
2015-03-01 10:35:04 +01:00
Max Bruckner
b1a438fd7f
New generic toString for RangeNode
2015-03-01 10:35:03 +01:00
Max Bruckner
9489fbf9dc
New generic toString for ConditionalNode
2015-03-01 10:35:03 +01:00
Max Bruckner
1ac3319656
OperatorNode: validate input
2015-03-01 10:35:03 +01:00
Max Bruckner
0e5a6e5a38
New generic toString for OperatorNode
2015-03-01 10:35:03 +01:00
Max Bruckner
946df4d4b2
Function to calculate all necessary parentheses
...
calculateNecessaryParentheses takes an OperatorNode and it's arguments
and calculates which of those arguments need to be put in parentheses
based on precedence and associativity.
2015-03-01 10:35:03 +01:00
Max Bruckner
d593e749e9
New function getIdentifier() for Nodes
...
getIdentifier() returns a String that contains the name of the node and
the function associated with it ( in case of FunctionNode and
OperatorNode ).
2015-03-01 10:35:03 +01:00
Jos de Jong
4669542079
Merge pull request #277 from FSMaxB/totex-fix
...
Fix missing brackets in LaTeX output (bug #273 )
2015-02-20 12:41:41 +00:00
jos
70a476c357
Replaced all require('decimal.js') with require('../type/BigNumber'), containing the toJSON and fromJSON methods for BigNumber
2015-02-18 20:41:27 +01:00
Max Bruckner
183d15fcfe
OperatorNode: remove unnecessary elseif
2015-02-14 02:36:57 +01:00
Max Bruckner
bbe22a9055
fix: no brackets with single operators (bug #273 )
...
* Use brackets after unary minus followed by an OperatorNode with + or -
- "-(a+b)", "-(a-b)"
* Use brackets in fron of postfix operators like '!' (for OperatorNode)
- "(a*b)!", "(a+b)!"
2015-02-14 02:36:38 +01:00
Max Bruckner
23b1890f7e
fix indentation of previous commit
2015-02-14 01:48:54 +01:00
Max Bruckner
9b6d7ead9f
Fix missing brackets in LaTeX output (bug #273 )
...
When creating the LaTeX output for expressions like 1-(1+1) or 1-(1-1),
the bracket's where missing.
2015-02-13 16:51:40 +01:00
jos
86bcd55352
Changed the way transforms are registered internally, making Node.compile faster, and enabling lazy-loading constants
2015-01-13 10:48:52 +01:00
jos
309bf3938d
Added proper error messages to Node.map
2014-11-15 13:32:02 +01:00
jos
9257ec3c33
Added unit tests for Node.map and Node.forEach
2014-11-15 13:16:32 +01:00
jos
5669ae1365
Some refactoring
2014-11-14 11:35:13 +01:00
jos
a1f60db0d1
Created Node.map, changed traverse to use Node.map
2014-11-14 11:25:48 +01:00
jos
20c96894ab
Enforcing implementation of _traverse on Nodes
2014-11-13 22:16:57 +01:00
jos
be9a8629ea
Node.transform does not create a clone of the tree anymore
2014-11-13 22:01:48 +01:00
jos
92627f2c94
Nodes for a BlockNode must now be passed via the constructor instead of via a function add
2014-11-13 21:54:41 +01:00
jos
423909e6f1
Changed constructor of RangeNode to new RangeNode(start: Node, end: Node [, step: Node]).
2014-11-13 21:25:37 +01:00