Template:Team:UC Davis/MutantWidget
From 2011.igem.org
(Difference between revisions)
Line 592: | Line 592: | ||
//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-1; | ||
+ | } | ||
+ | if(ky > thisdatay.length-1) | ||
+ | { | ||
+ | ky = thisdatay.length-1; | ||
+ | } | ||
kx--; | kx--; | ||
ky--; | ky--; |
Revision as of 00:30, 28 September 2011