Template:Team:UC Davis/MutantWidget
From 2011.igem.org
(Difference between revisions)
Line 571: | Line 571: | ||
//Find flanking x,y values | //Find flanking x,y values | ||
var kx = ky = 0; | var kx = ky = 0; | ||
- | while(thisx >= thisdatax[kx] | + | while(thisx >= thisdatax[kx]) { |
kx=kx+1; | kx=kx+1; | ||
} | } | ||
- | while(thisy >= thisdatay[ky] | + | while(thisy >= thisdatay[ky]) { |
ky=ky+1; | ky=ky+1; | ||
} | } | ||
+ | if(kx >= thisdatax.length-1) | ||
+ | { | ||
+ | kx = thisdatax.length-2 | ||
+ | } | ||
+ | if(ky >= thisdatay.length-1) | ||
+ | { | ||
+ | ky = thisdatay.length-2 | ||
+ | } | ||
kx--; | kx--; | ||
ky--; | ky--; |
Revision as of 08:04, 27 September 2011