Closed AdamTadeusz closed 1 week ago
@Rainyan do you think the compiler is smart enough to reduce (100 * (1 / NEO_SUPPORT_DAMAGE_MODIFIER)) + 1) to a single value or should that be another constexpr too?
@Rainyan do you think the compiler is smart enough to reduce (100 * (1 / NEO_SUPPORT_DAMAGE_MODIFIER)) + 1) to a single value or should that be another constexpr too?
Almost certainly the compiler will calculate that at compile time. But doesn't hurt to constexpr it if we can.
@Rainyan do you think the compiler is smart enough to reduce (100 * (1 / NEO_SUPPORT_DAMAGE_MODIFIER)) + 1) to a single value or should that be another constexpr too?
Almost certainly the compiler will calculate that at compile time. But doesn't hurt to constexpr it if we can.
Also it would be easier to understand what thats there for, magic numbers and all that
@Rainyan do you think the compiler is smart enough to reduce (100 * (1 / NEO_SUPPORT_DAMAGE_MODIFIER)) + 1) to a single value or should that be another constexpr too?
Almost certainly the compiler will calculate that at compile time. But doesn't hurt to constexpr it if we can.
Also it would be easier to understand what thats there for, magic numbers and all that
Yeah, feel free to refactor it if you want.
I tested again after refactoring, and at 36.87 degrees the bots sometimes die and sometimes not. Im guessing this testing methodology isn't ideal (running setang 0 90 0 multiple times with a different starting orientation each time results in different calculated attack angles, differences in the hundredths of a degree) so Ill just blame it on that and leave it as is
Description
Toolchain
Linked Issues