MCPcopy Create free account
hub / github.com/FastLED/FastLED / test_unary_negation_impl

Function test_unary_negation_impl

tests/fl/math/fixed_point.cpp:434–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

432
433template<typename T>
434void test_unary_negation_impl() {
435 T a(3.5f);
436 T neg_a = -a;
437 FL_CHECK_EQ(neg_a.raw(), -a.raw());
438
439 // Double negation
440 FL_CHECK_EQ((-neg_a).raw(), a.raw());
441
442 // Negate zero
443 T zero;
444 FL_CHECK_EQ((-zero).raw(), raw_t<T>(0));
445}
446
447template<typename T>
448void test_multiply_impl() {

Callers

nothing calls this directly

Calls 1

rawMethod · 0.45

Tested by

no test coverage detected