Esempio n. 1
0
        /// <summary>
        /// 课题研究目标、研究内容和拟解决的关键性问题
        ///
        /// </summary>
        /// <returns></returns>
        public Real GetMass()
        {
            if (Precision.RealApproximately(_inverseMass, 0))
            {
                return(Precision.REAL_MAX);
            }

            return(((Real)1) / _inverseMass);
        }
Esempio n. 2
0
 /// <summary>
 /// 设置质量
 /// @warning This invalidates internal data for the particle.
 /// Either an integration function, or the calculateInternals
 /// function should be called before trying to get any settings
 /// from the particle.
 /// </summary>
 /// <param name="mass"></param>
 public void SetMass(Real mass)
 {
     Assert.IsFalse(Precision.RealApproximately(mass, 0));
     _inverseMass = ((Real)1) / mass;
 }