Skip to content

Instantly share code, notes, and snippets.

View mrquincle's full-sized avatar
💭
Does it have LEDs?

Anne van Rossum mrquincle

💭
Does it have LEDs?
View GitHub Profile
@mrquincle
mrquincle / documentation.md
Last active August 3, 2021 14:56
Documentation
@mrquincle
mrquincle / main.cpp
Last active November 22, 2021 17:04
Gist to explain DecreaseMember
/**
* Copy <cs_Math> from bluenet repository and if not present add to it the following function.
template<class T, class M, class U=int>
constexpr inline decltype(auto) DecreaseMember(T& obj, M member, U diff=1) {
obj.*member = SafeAdd(obj.*member, -diff);
return obj.*member;
}
* Compile with g++ -I. main.cpp -o main