MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / cmp

Function cmp

ogsr_engine/xrGame/CharacterPhysicsSupport.cpp:329–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327const float cmp_angle = M_PI / 10.f;
328const float cmp_ldisp = 0.1f;
329IC bool cmp(const Fmatrix& f0, const Fmatrix& f1)
330{
331 Fmatrix if0;
332 if0.invert(f0);
333 Fmatrix cm;
334 cm.mul_43(if0, f1);
335
336 Fvector ax;
337 float ang;
338 Fquaternion q;
339 q.set(cm);
340 q.get_axis_angle(ax, ang);
341
342 return ang < cmp_angle && cm.c.square_magnitude() < cmp_ldisp * cmp_ldisp;
343}
344
345bool is_similar(const Fmatrix& m0, const Fmatrix& m1, float param)
346{

Callers 1

KillHitMethod · 0.70

Calls 5

mul_43Method · 0.80
get_axis_angleMethod · 0.80
invertMethod · 0.45
setMethod · 0.45
square_magnitudeMethod · 0.45

Tested by

no test coverage detected