Template:Team:UC Davis/MutantWidget
From 2011.igem.org
(Difference between revisions)
Line 68: | Line 68: | ||
fr1 = (x-x1)/(x2-x1)*z1 + (x2-x)/(x2-x1)*z0; | fr1 = (x-x1)/(x2-x1)*z1 + (x2-x)/(x2-x1)*z0; | ||
fr2 = (x-x1)/(x2-x1)*z3 + (x2-x)/(x2-x1)*z2; | fr2 = (x-x1)/(x2-x1)*z3 + (x2-x)/(x2-x1)*z2; | ||
+ | if(!fr1 || !fr2) | ||
+ | { | ||
+ | alert("MAJOR INTERPOLATION PROBLEMS!\nx1:"+x1+"\ny1:"+y1+"\nx2:"+x2+"\ny2:"+y2+"\nzs:"+z0+","+z1+","+z2+","+z3+","+z4+"\n("+x+","+y+")"); | ||
+ | } | ||
return ((y-y1)/(y2-y1)*fr2 + (y2-y)/(y2-y1)*fr1); | return ((y-y1)/(y2-y1)*fr2 + (y2-y)/(y2-y1)*fr1); | ||
} | } | ||
Line 397: | Line 401: | ||
function(index) | function(index) | ||
{ | { | ||
- | |||
var thisdataz = $(this).text().split(','); | var thisdataz = $(this).text().split(','); | ||
var thisdatax = $('.xdata_3d').text().split(','); | var thisdatax = $('.xdata_3d').text().split(','); |
Revision as of 04:20, 26 September 2011