MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / ClipPlane

Function ClipPlane

src/SB/Core/gc/iMath3.cpp:436–468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434}
435
436static U32 ClipPlane(F32 denom, F32 numer, F32* t_in, F32* t_out)
437{
438 if (denom > 0.0f)
439 {
440 if (numer > denom * (*t_out))
441 {
442 return 0;
443 }
444
445 if (numer > denom * (*t_in))
446 {
447 *t_in = numer / denom;
448 }
449
450 return 1;
451 }
452 else if (denom < 0.0f)
453 {
454 if (numer > denom * (*t_in))
455 {
456 return 0;
457 }
458
459 if (numer > denom * (*t_out))
460 {
461 *t_out = numer / denom;
462 }
463
464 return 1;
465 }
466
467 return (numer <= 0.0f);
468}
469
470static U32 ClipBox(const xVec3* r3, const xVec3* r4, const xVec3* r5, F32* t_in, F32* t_out)
471{

Callers 1

ClipBoxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected