MCPcopy Create free account
hub / github.com/JACoders/OpenJK / CM_Subdivide

Function CM_Subdivide

code/qcommon/cm_patch.cpp:216–224  ·  view source on GitHub ↗

=============== CM_Subdivide a, b, and c are control points. the subdivided sequence will be: a, out1, out2, out3, c =============== */

Source from the content-addressed store, hash-verified

214===============
215*/
216static void CM_Subdivide( vec3_t a, vec3_t b, vec3_t c, vec3_t out1, vec3_t out2, vec3_t out3 ) {
217 int i;
218
219 for ( i = 0 ; i < 3 ; i++ ) {
220 out1[i] = 0.5 * (a[i] + b[i]);
221 out3[i] = 0.5 * (b[i] + c[i]);
222 out2[i] = 0.5 * (out1[i] + out3[i]);
223 }
224}
225
226/*
227=================

Callers 1

CM_SubdivideGridColumnsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected