using System; using L=Science.Physics.GeneralPhysics; namespace ScienceTest.PhysicsTest.GeneralPhysicsTest { /// /// Scalar /// public class ScalarTest { public ScalarTest() { } private string result; public string Result { get{return result;} } public void Compute() { L.Time t = new L.Time(); t.s = 3.0; L.Scalar.FunctionOfTime st = new L.Scalar.FunctionOfTime(Func); L.Mass m = new L.Mass(); m.ScalarFunctionOfTime = st; m.Set(t); result += "m="+m.ToString()+"\r\n"; } private L.Scalar Func(L.Time t) { L.Scalar x = new L.Scalar(); x.Magnitude = -4.0*t.s+2.0*t.s*t.s; return x; } } } // m=6 +/- 0 (kg)