Exemple #1
0
func MomentForCircle(mass, innerDiameter, outerDiameter float32, offset Vect) float32 {
	return float32(C.cpMomentForCircle(f(mass), f(innerDiameter), f(outerDiameter), C.cpVect(offset)))
}
Exemple #2
0
// MomentForCircle returns the moment of inertia for a circle.
func MomentForCircle(m, r1, r2 float64, offset Vect) float64 {
	return float64(C.cpMomentForCircle(C.cpFloat(m), C.cpFloat(r1), C.cpFloat(r2), offset.c()))
}
Exemple #3
0
func MomentForCircle(mass float64, r1 float64, r2 float64, offset Vect) float64 {
	return float64(
		C.cpMomentForCircle(C.cpFloat(mass), C.cpFloat(r1), C.cpFloat(r2), offset.CPVect),
	)
}