i have inputs a,b,c.
and im trying to use pythagoras on it…
ive tried two formulas…
both with this annoying result…
it works perfectly teh first tym…
but once i try to enter a different set of values i either get nothing or i get flash deleting the values ive inputted…
is tehre a reason for this?
here are my two formulas
on (release) {
on(release){
Maybe:
on (release) {
// pythagoras
var res;
if (!c){
res = Math.sqrt(Math.pow(a,2) + Math.pow(b,2));
c = res;
}
if (!a){
res = Math.sqrt(Math.pow(c,2) - Math.pow(a,2));
a = res;
}
if (!b){
res = Math.sqrt(Math.pow(c,2) - Math.pow(b,2));
b = res;
}
}
Couldn’t test it tough.