Method: CP::BB#segment_query
- Defined in:
- ext/chipmunk/rb_cpBB.c
#segment_query(va, vb) ⇒ Object
/ Returns the fraction along the segment query the cpBB is hit. Returns INFINITY if it doesn’t hit.
217 218 219 220 221 222 223 224 225 226 227 |
# File 'ext/chipmunk/rb_cpBB.c', line 217 static VALUE rb_cpBBSegmentQuery(VALUE self, VALUE va, VALUE vb) { cpVect *a, *b; a = VGET(va); b = VGET(vb); if(a && b) { return DBL2NUM(cpBBSegmentQuery(*BBGET(self), *a, *b)); } rb_raise(rb_eArgError, "query requires 2 Vect2 arguments"); return Qnil; } |