示例#1
0
文件: mass.go 项目: krux02/gode
func (m *Mass) Adjust(newmass Real) {
	C.dMassAdjust((*C.dMass)(m), C.dReal(newmass))
}
示例#2
0
文件: mass.go 项目: bfosberry/ode
// Adjust sets parameters based on the given total mass.
func (m *Mass) Adjust(mass float64) {
	c := &C.dMass{}
	m.toC(c)
	C.dMassAdjust(c, C.dReal(mass))
	m.fromC(c)
}