MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / intervalOverlap

Function intervalOverlap

TheForceEngine/TFE_Editor/editorMath.h:25–28  ·  view source on GitHub ↗

Return true if the 1D intervals [a0, a1] and [b0, b1] overlap.

Source from the content-addressed store, hash-verified

23 }
24 // Return true if the 1D intervals [a0, a1] and [b0, b1] overlap.
25 inline bool intervalOverlap(f32 a0, f32 a1, f32 b0, f32 b1)
26 {
27 return a0 <= b1 && b0 <= a1;
28 }
29 // Return true if the 2D bounds (packed as Vec4f) overlap.
30 inline bool boundsOverlap(Vec4f bounds0, Vec4f bounds1, f32 padding = 0.0f)
31 {

Callers 2

boundsOverlapFunction · 0.85
boundsOverlap3DFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected