Skip to content

Commit

Permalink
fixed #27
Browse files Browse the repository at this point in the history
  • Loading branch information
ddavidebor committed Nov 19, 2016
1 parent 1a3fae1 commit 79e510c
Show file tree
Hide file tree
Showing 16 changed files with 3 additions and 131 deletions.
10 changes: 0 additions & 10 deletions docs/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Function | Description
[complex(re, im)](functions/complex.md) | Create a complex value or convert a value to a complex value.
[createUnit(units)](functions/createUnit.md) | Create a user-defined unit and register it with the Unit type.
[fraction(numerator, denominator)](functions/fraction.md) | Create a fraction convert a value to a fraction.
[index(range1, range2, ...)](functions/index.md) | Create an index.
[matrix(x)](functions/matrix.md) | Create a Matrix.
[number(value)](functions/number.md) | Create a number or convert a string, boolean, or unit to a number.
[sparse(x)](functions/sparse.md) | Create a Sparse Matrix.
Expand Down Expand Up @@ -121,9 +120,7 @@ Function | Description
[eye(n)](functions/eye.md) | Create a 2-dimensional identity matrix with size m x n or n x n.
[filter(x, test)](functions/filter.md) | Filter the items in an array or one dimensional matrix.
[flatten(x)](functions/flatten.md) | Flatten a multi dimensional matrix into a single dimensional matrix.
[forEach(x, callback)](functions/forEach.md) | Iterate over all elements of a matrix/array, and executes the given callback function.
[inv(x)](functions/inv.md) | Calculate the inverse of a square matrix.
[map(x, callback)](functions/map.md) | Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array.
[ones(m, n, p, ...)](functions/ones.md) | Create a matrix filled with ones.
[partitionSelect(x, k)](functions/partitionSelect.md) | Partition-based selection of an array or 1D matrix.
[range(start, end [, step])](functions/range.md) | Create an array from a range.
Expand Down Expand Up @@ -178,13 +175,6 @@ Function | Description
[sum(a, b, c, ...)](functions/sum.md) | Compute the sum of a matrix or a list with values.
[var(a, b, c, ...)](functions/var.md) | Compute the variance of a matrix or a list with values.

## String functions

Function | Description
---- | -----------
[format(value [, precision])](functions/format.md) | Format a value of any type into a string.
[print(template, values [, precision])](functions/print.md) | Interpolate values into a string template.

## Trigonometry functions

Function | Description
Expand Down
1 change: 0 additions & 1 deletion docs/functions/bignumber.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ bignumber('7.2e500'); // returns BigNumber 7.2e500

[boolean](boolean.md),
[complex](complex.md),
[index](index.md),
[matrix](matrix.md),
[string](string.md),
[unit](unit.md)
1 change: 0 additions & 1 deletion docs/functions/boolean.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ boolean([1, 0, 1, 1]); // returns [true, false, true, true]

[bignumber](bignumber.md),
[complex](complex.md),
[index](index.md),
[matrix](matrix.md),
[string](string.md),
[unit](unit.md)
1 change: 0 additions & 1 deletion docs/functions/complex.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ var d = add(a, b); // Complex 5 + 2i

[bignumber](bignumber.md),
[boolean](boolean.md),
[index](index.md),
[matrix](matrix.md),
[number](number.md),
[string](string.md),
Expand Down
2 changes: 0 additions & 2 deletions docs/functions/filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,4 @@ filter(["23", "foo", "100", "55", "bar"], /[0-9]+/); // returns ["23", "100", "5

## See also

[forEach](forEach.md),
[map](map.md),
[sort](sort.md)
60 changes: 0 additions & 60 deletions docs/functions/import.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/functions/matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ m.get([1, 0]) // number 3
[bignumber](bignumber.md),
[boolean](boolean.md),
[complex](complex.md),
[index](index.md),
[number](number.md),
[string](string.md),
[unit](unit.md),
Expand Down
1 change: 0 additions & 1 deletion docs/functions/number.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ number(unit('52cm'), 'm'); // returns 0.52
[bignumber](bignumber.md),
[boolean](boolean.md),
[complex](complex.md),
[index](index.md),
[matrix](matrix.md),
[string](string.md),
[unit](unit.md)
4 changes: 1 addition & 3 deletions docs/functions/sort.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,4 @@ sort(['Langdon', 'Tom', 'Sara'], sortByLength); // returns ['Tom', 'Sara', 'Lang

## See also

[filter](filter.md),
[forEach](forEach.md),
[map](map.md)
[filter](filter.md)
1 change: 0 additions & 1 deletion docs/functions/sparse.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ m.get([1, 0]) // number 3
[bignumber](bignumber.md),
[boolean](boolean.md),
[complex](complex.md),
[index](index.md),
[number](number.md),
[string](string.md),
[unit](unit.md),
Expand Down
5 changes: 0 additions & 5 deletions docs/functions/stirlingS2.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,3 @@ Number | BigNumber | S(n,k)
```js
stirlingS2(5, 3); //returns 25
```


## See also

[Bell numbers](Bell numbers.md)
1 change: 0 additions & 1 deletion docs/functions/string.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ string([true, false]); // returns ['true', 'false']
[bignumber](bignumber.md),
[boolean](boolean.md),
[complex](complex.md),
[index](index.md),
[matrix](matrix.md),
[number](number.md),
[unit](unit.md)
3 changes: 1 addition & 2 deletions docs/functions/subset.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,4 @@ var g = subset(f, index(1, 1), 7, 0); // g = [[5, 6], [0, 7]]

[size](size.md),
[resize](resize.md),
[squeeze](squeeze.md),
[index](index.md)
[squeeze](squeeze.md)
1 change: 0 additions & 1 deletion docs/functions/unit.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ a.to('m'); // returns Unit 0.05 m
[bignumber](bignumber.md),
[boolean](boolean.md),
[complex](complex.md),
[index](index.md),
[matrix](matrix.md),
[number](number.md),
[string](string.md),
Expand Down
6 changes: 0 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@ a=1 ; a=2; a+1 // exactly same as before, but returns directly 3 instead of a=3
```


# Reference

* [Physical constants](constants.md)
* [Mathematical functions](functions/index.md)
* [Mathematical operators](operators.md)
* [Units of measurement](functions.md)

# Thanks

Expand Down
36 changes: 1 addition & 35 deletions docs/operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,7 @@ A number can be converted to a string and vice versa using the functions
```

Mathlion uses regular JavaScript numbers, which are floating points with a
limited precision and limited range. The limitations are described in detail
on the page [Numbers](../datatypes/numbers.md).
limited precision and limited range.

```js
('1e-325'); // 0
Expand Down Expand Up @@ -288,39 +287,6 @@ var parser = math.parser();
```


### Units

Mathlion supports units. Units can be used in the arithmetic operations
add, subtract, multiply, divide, and exponentiation.
Units can also be converted from one to another.
An overview of all available units can be found on the page
[Units](../datatypes/units.md).

Units can be converted using the operator `to` or `in`.

```js
// create a unit
('5.4 kg'); // Unit, 5.4 kg

// convert a unit
('2 inch to cm'); // Unit, 5.08 cm
('20 celsius in fahrenheit'); // Unit, ~68 fahrenheit
('90 km/h to m/s'); // Unit, 25 m / s

// convert a unit to a number
// A second parameter with the unit for the exported number must be provided
('number(5 cm, mm)'); // Number, 50

// calculations with units
('0.5kg + 33g'); // Unit, 0.533 kg
('3 inch + 2 cm'); // Unit, 3.7874 inch
('3 inch + 2 cm'); // Unit, 3.7874 inch
('12 seconds * 2'); // Unit, 24 seconds
('sin(45 deg)'); // Number, 0.7071067811865475
('9.81 m/s^2 * 5 s to mi/h') // Unit, 109.72172512527 mi / h
```


### Strings

Strings are enclosed by double quotes ". Strings can be concatenated using the
Expand Down

0 comments on commit 79e510c

Please sign in to comment.