FastLED 3.10.6
Loading...
Searching...
No Matches

◆ cofactorQ32()

bool fl::anonymous_namespace{device_solve.cpp.hpp}::cofactorQ32 ( i32 e,
i32 i_,
i32 f,
i32 h,
i64 * out )

e * i - f * h, or false if any part of it leaves i64.

Definition at line 67 of file device_solve.cpp.hpp.

67 {
68 const i64 left = static_cast<i64>(e) * static_cast<i64>(i_);
69 const i64 right = static_cast<i64>(f) * static_cast<i64>(h);
70 // Two i32 products always fit; their difference need not.
71 if (!sumFitsI64(left, -right)) {
72 return false;
73 }
74 *out = left - right;
75 return true;
76}
bool sumFitsI64(i64 a, i64 b) FL_NO_EXCEPT
Does a + b fit an i64, for operands already known to be in range?
fl::i64 i64
Definition stdint.h:221

References cofactorQ32(), fl::FL_NO_EXCEPT, and sumFitsI64().

Referenced by cofactorQ32().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: