little bit more docs

main
Brett 2025-01-28 15:25:47 -05:00
parent 0dadfb73a7
commit 88957ce805
2 changed files with 10 additions and 2 deletions

View File

@ -27,7 +27,7 @@ macro(compile_options target_name)
sanitizers(${target_name})
endmacro()
project(blt-gp VERSION 0.3.32)
project(blt-gp VERSION 0.3.33)
include(CTest)

View File

@ -84,7 +84,15 @@ namespace blt::gp::example
void setup_operations()
{
BLT_DEBUG("Setup Types and Operators");
static operation_t add{[](const float a, const float b) { return a + b; }, "add"};
static operation_t add{
// this is the function used by the operation
[](const float a, const float b)
{
return a + b;
},
// this name is optional and is used if you print an individual
"add"
};
static operation_t sub([](const float a, const float b) { return a - b; }, "sub");
static operation_t mul([](const float a, const float b) { return a * b; }, "mul");
static operation_t pro_div([](const float a, const float b) { return b == 0.0f ? 0.0f : a / b; }, "div");