Commit 230b7464 authored by olau@iola.dk's avatar olau@iola.dk

Be more precise when generating the numbers

git-svn-id: https://flot.googlecode.com/svn/trunk@95 1e0a6537-2640-0410-bfb7-f154510ff394
parent f62f3bf7
......@@ -31,8 +31,10 @@ $(function () {
// setup plot
function getData(x1, x2) {
var d = [];
for (var i = x1; i < x2; i += (x2 - x1) / 100)
d.push([i, Math.sin(i * Math.sin(i))]);
for (var i = 0; i <= 100; ++i) {
var x = x1 + i * (x2 - x1) / 100;
d.push([x, Math.sin(x * Math.sin(x))]);
}
return [
{ label: "sin(x sin(x))", data: d }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment