Last change
on this file since 249 was
249,
checked in by hendrikvanantwerpen, 13 years ago
|
This one's for Subversion, because it's so close...
First widget (stripped down sequencer).
Seperated client and server code in two direcotry trees.
|
File size:
380 bytes
|
Line | |
---|
1 | function d3_scale_nice(domain, nice) { |
---|
2 | var i0 = 0, |
---|
3 | i1 = domain.length - 1, |
---|
4 | x0 = domain[i0], |
---|
5 | x1 = domain[i1], |
---|
6 | dx; |
---|
7 | |
---|
8 | if (x1 < x0) { |
---|
9 | dx = i0; i0 = i1; i1 = dx; |
---|
10 | dx = x0; x0 = x1; x1 = dx; |
---|
11 | } |
---|
12 | |
---|
13 | nice = nice(x1 - x0); |
---|
14 | domain[i0] = nice.floor(x0); |
---|
15 | domain[i1] = nice.ceil(x1); |
---|
16 | return domain; |
---|
17 | } |
---|
18 | |
---|
19 | function d3_scale_niceDefault() { |
---|
20 | return Math; |
---|
21 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.