little bit more docs
parent
0dadfb73a7
commit
88957ce805
|
@ -27,7 +27,7 @@ macro(compile_options target_name)
|
||||||
sanitizers(${target_name})
|
sanitizers(${target_name})
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
project(blt-gp VERSION 0.3.32)
|
project(blt-gp VERSION 0.3.33)
|
||||||
|
|
||||||
include(CTest)
|
include(CTest)
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,15 @@ namespace blt::gp::example
|
||||||
void setup_operations()
|
void setup_operations()
|
||||||
{
|
{
|
||||||
BLT_DEBUG("Setup Types and Operators");
|
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 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 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");
|
static operation_t pro_div([](const float a, const float b) { return b == 0.0f ? 0.0f : a / b; }, "div");
|
||||||
|
|
Loading…
Reference in New Issue