diff --git a/src/main.cpp b/src/main.cpp index a9f43cb..7f528ec 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,6 +15,9 @@ int main(void) { log::debug << "Hello world!" << mtl::endl; + float cos_PI_2 = std::cos(M_PI_4); + fixed cos_PI_2_fx = cos_PI_2; + ruleset_t rules; try { @@ -23,8 +26,8 @@ int main(void) { token_id_t walk_petal_length = rules.add_token(token_type_e::walk, 8); token_id_t walk_petal_side = rules.add_token(token_type_e::walk, 4); - token_id_t rotate_axiom = rules.add_token(token_type_e::rotate, M_PI_2); - token_id_t rotate_petal = rules.add_token(token_type_e::rotate, M_PI_2); + token_id_t rotate_axiom = rules.add_token(token_type_e::rotate, cos_PI_2_fx); + token_id_t rotate_petal = rules.add_token(token_type_e::rotate, cos_PI_2_fx); token_id_t rotate_branchr = rules.add_token(token_type_e::rotate, branch_angle); token_id_t rotate_branchl = rules.add_token(token_type_e::rotate, branch_angle * -2);