|
public bool SetEquationValue(EquationMgr eqMgr, string name, double newValue)% e" U! s3 V& Q; c5 j" [( V c/ o
{% l4 G8 z! Q5 V0 ?1 C0 J2 }& b
int index = GetEquationIndexByName(eqMgr, name); \5 \5 k$ V+ ]' I
9 c& F# R$ A+ \$ w0 m8 c) W$ j if (index != -1)
* M n. j% C/ X& T2 J0 U) H% { {" p+ g5 q: e& f' I' T b' c/ Q! [
eqMgr.Equation[index] = "\"" + name + "\"=" + newValue;
! U' [* W: Y8 F6 l5 K( M s
5 M; k5 i' Q; q, Y; r6 M return true;
3 ?1 m; O# g1 y }1 f3 _3 J t3 j$ ]: Y8 q0 p
else
' O7 u" W8 ~+ b t* h6 F {
$ h' F% H) b* y return false;, ^( j5 W3 ^ s7 U2 C- p7 H7 i
}
+ S' G4 d2 s* i }$ d) H: E) x- Y" R/ ]" j& \
5 {$ F4 w0 K, y4 b ~; T, a; Y
|
|