try a better triangle

This commit is contained in:
Will Bradley 2024-01-17 16:29:59 -08:00
parent 59d6aa193a
commit 0fc2e611cd
Signed by: will
GPG Key ID: 1159B930701263F3

View File

@ -45,7 +45,7 @@ namespace {
} }
lv_point_t CoordinateRelocateTriangle(int16_t radius, int16_t angle, int16_t base_offset) { lv_point_t CoordinateRelocateTriangle(int16_t radius, int16_t angle, int16_t base_offset) {
return lv_point_t {.x = CoordinateXRelocate(radius * static_cast<int32_t>(Sine(angle)) / LV_TRIG_SCALE + base_offset), return lv_point_t {.x = CoordinateXRelocate((radius + base_offset) * static_cast<int32_t>(Sine(angle)) / LV_TRIG_SCALE),
.y = CoordinateYRelocate(radius * static_cast<int32_t>(Cosine(angle)) / LV_TRIG_SCALE)}; .y = CoordinateYRelocate(radius * static_cast<int32_t>(Cosine(angle)) / LV_TRIG_SCALE)};
} }