Exemple #1
0
// MomentForSegment returns the moment of inertia for a line segment.
func MomentForSegment(m float64, a, b Vect) float64 {
	return float64(C.cpMomentForSegment(C.cpFloat(m), a.c(), b.c()))
}
Exemple #2
0
func (s *Segment) GetMoment(mass float64) float64 {
	return float64(C.cpMomentForSegment(C.cpFloat(mass), s.A.CPVect, s.B.CPVect))
}