algorithm - How to solve system of equation with JavaScript -
i'm trying do algebra in javascript based on conditions , known variables i'm not enough @ maths or javascript understand how write it.
so here's conditions:
var w1 = h1/1.98 var w2 = h2/0.6355 h1 = h2 w1 + w2 = 1367
i'm not 100% sure think there may enough info here find out w1, w2, h1 , h2 are.
does know how can create calculation?
here solution variables need:
function algebra(c1, c2) { /* given these equations w1 = h1/c1 w2 = h2/c2 h1 = h2 w1 + w2 = 1367; */ var w1 = 1367 * c2 / (c1 + c2), h1 = w1 * c1; return {w1:w1, w2:1367-w1, h1:h1, h2:h1}; }
Comments
Post a Comment