39 Commits

Author SHA1 Message Date
Max Bruckner
49e3fb7fad ConditionalNode: simplify LaTeX by using the 'cases' environment 2016-01-05 10:53:11 +01:00
jos
9ffab397b6 Fixed #485: Scoping issue with variables both used globally as well as in a function definition 2015-11-28 21:20:25 +01:00
jos
ee52d4907a Removed some unused references 2015-07-31 09:23:09 +02:00
jos
2353c4a61e Renamed folders util to utils 2015-07-18 13:22:38 +02:00
jos
6c7bf4acf0 Removed boolean, string, and null from the list with argument types, only leaving the directly supported types (which types can be converted to supported types is determined externally). Consistently renamed primitive types lower case (boolean, string, number, null) and non-primitive types uppercase (Complex, BigNumber, Function, Array, ...). 2015-05-20 21:08:26 +02:00
Max Bruckner
5b160767c1 operators.js: Pass parenthesis option directly 2015-05-16 13:31:57 +02:00
Max Bruckner
3f217cefdd toTex: no global configuration. Only pass around one local object 2015-05-16 13:30:25 +02:00
Max Bruckner
c0e1b2d268 toString: no global configuration. Only pass around one local object 2015-05-16 13:29:55 +02:00
Max Bruckner
a347405a98 toString: implement callbacks and local configuration 2015-05-16 13:28:51 +02:00
Max Bruckner
291d620972 Pass local configuration to toTex functions 2015-05-16 13:27:48 +02:00
Max Bruckner
aa7ca9178f Implement 'all' parenthesis option 2015-05-08 09:07:15 +02:00
Max Bruckner
2959858b99 operators: Use config when calculating precedence etc.
Use the parenthesis configuration to decide wether ParenthesisNodes
should be skipped or not.
2015-05-07 10:13:43 +02:00
Max Bruckner
bc2c29be8c Make _toString functions call the wrapper 2015-05-07 10:12:32 +02:00
jos
06b9664b87 Removed more instanceof checks 2015-05-05 15:21:57 +02:00
jos
7e3eda8603 Moved all data types and their construction functions into a folder of their own under ./lib/type 2015-05-05 13:51:24 +02:00
Max Bruckner
6235fd6ce1 Make toString a wrapper around _toString
This enables preparating the node tree in `toString` before generating
the actual string output with `_toString` methods
2015-04-30 00:12:54 +02:00
jos
1204259209 Refactored Complex and Unit into factory functions 2015-04-28 22:04:42 +02:00
Max Bruckner
8282f424c2 Use the prototype for is<Node> instead of the constructor 2015-04-28 20:13:53 +02:00
Max Bruckner
1c76430dda Get rid of 'instanceof' for Nodes (except for constructors) 2015-04-28 10:09:19 +02:00
Max Bruckner
390a0060b4 Add is<NameOfNode> property to enable type checking across constructors 2015-04-28 09:14:53 +02:00
jos
d3d3212633 Refactored all nodes into factory functions (see #342) 2015-04-26 21:25:31 +02:00
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
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
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
Max Bruckner
e04dfd26bc Rename customFuncions to callbacks 2015-03-17 18:30:26 +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
Max Bruckner
9489fbf9dc New generic toString for ConditionalNode 2015-03-01 10:35:03 +01: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
jos
309bf3938d Added proper error messages to Node.map 2014-11-15 13:32:02 +01:00
jos
a1f60db0d1 Created Node.map, changed traverse to use Node.map 2014-11-14 11:25:48 +01:00
jos
95a49fe156 Node.transform first clones the node tree 2014-10-11 21:59:47 +02:00
jos
839e596772 Implemented transform and traverse 2014-10-11 18:03:41 +02:00
jos
5f08307391 Implemented a function replace for nodes of a parsed expression. 2014-10-11 15:33:23 +02:00
jos
8a12c8e9bc Fixed #200: A new instanceof of math.js must now be created as math.create([options]) instead of math([options]) 2014-08-03 21:42:12 +02:00
jos
40986a1325 Using strict mode now in all files (added 'use strict'; on top of every file) 2014-07-18 23:19:14 +02:00
jos
4645529f40 Removed function ifElse 2014-06-30 14:52:54 +02:00
jos
a9226ef70d Fixed #187: changed the behavior of the conditional operator (a ? b : c) to lazy evaluation. 2014-06-20 21:14:58 +02:00