// BodyNew creates a new body. func BodyNew(m, i float64) Body { b := cpBody(C.cpBodyNew(C.cpFloat(m), C.cpFloat(i))) bodyDataMap[b] = &bodyData{} return b }
func NewBody(mass float64, moment float64) *Body { var cpbody *C.cpBody = C.cpBodyNew(C.cpFloat(mass), C.cpFloat(moment)) body := Body{cpbody} bodyLookup[cpbody] = &body return &body }
func NewBody(mass, moment float32) Body { return Body{ body: C.cpBodyNew(f(mass), f(moment))} }