cf_intersect_halfspace3¶
Category: math
GitHub: cute_math.h
Returns the intersection point of two planes.
CF_V2 cf_intersect_halfspace3(CF_Halfspace ha, CF_Halfspace hb) { CF_V2 a = {ha.n.x, hb.n.x}, b = {ha.n.y, hb.n.y}, c = {ha.d, hb.d}; float x = cf_det2(c, b) / cf_det2(a, b); float y = cf_det2(a, c) / cf_det2(a, b); return cf_v2(x, y); }
Related Pages¶
CF_Halfspace
cf_plane
cf_origin
cf_distance_hs
cf_project
cf_mul_tf_hs
cf_mul_T_tf_hs
cf_intersect_halfspace
cf_intersect_halfspace2