示例#1
0
文件: chipmunk.go 项目: andrebq/exp
func MomentForBox(mass, width, height float32) float32 {
	return float32(C.cpMomentForBox(f(mass), f(width), f(height)))
}
示例#2
0
// MomentForBox returns the moment of inertia for a solid box.
func MomentForBox(m, width, height float64) float64 {
	return float64(C.cpMomentForBox(C.cpFloat(m), C.cpFloat(width), C.cpFloat(height)))
}
示例#3
0
func MomentForBox(mass float64, width float64, height float64) float64 {
	return float64(
		C.cpMomentForBox(C.cpFloat(mass), C.cpFloat(width), C.cpFloat(height)),
	)
}