UNPKG
theorem.js
Version:
latest (1.2.0)
1.2.0
1.1.0
1.0.1
1.0.0
0.1.0
0.0.2
0.0.1
A Math library for computation in JavaScript
github.com/arguiot/TheoremJS
arguiot/TheoremJS
theorem.js
/
src
/
includes
/
functions
/
math
/
algebra
/
graph.js
8 lines
(7 loc)
•
231 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
graph
(
f,
from
=-
100
, to=
100
, step=
0.1
) {
let
array = {}
for
(
var
i =
new
BigNumber
(
from
); i.
lessThanOrEqualTo
(
new
BigNumber
(to)); i = i.
plus
(
new
BigNumber
(step))) { array[i.
toString
()] = f.
core
(i).
toFixed
(
15
) }
return
array }