diff options
| author | a1xd <[email protected]> | 2021-04-08 12:45:43 -0400 |
|---|---|---|
| committer | a1xd <[email protected]> | 2021-04-08 12:45:43 -0400 |
| commit | 6197390760eba8ca1123d03637cbb9af0414c5f7 (patch) | |
| tree | d60c21f8ca2e537374c4b727a4f46c6c4a47084f /common | |
| parent | fix some things (diff) | |
| download | rawaccel-6197390760eba8ca1123d03637cbb9af0414c5f7.tar.xz rawaccel-6197390760eba8ca1123d03637cbb9af0414c5f7.zip | |
fix conversions in arbitrary constructor
Diffstat (limited to 'common')
| -rw-r--r-- | common/accel-lookup.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/accel-lookup.hpp b/common/accel-lookup.hpp index 24b61e5..ff89fa7 100644 --- a/common/accel-lookup.hpp +++ b/common/accel-lookup.hpp @@ -262,9 +262,9 @@ namespace rawaccel { last_arbitrary_index = length - 2; last_point_speed = points[last_arbitrary_index].x; - double start = (int)floor(log(first_point_speed)); - double end = (int)floor(log(last_point_speed)); - double num = (int)floor(LUT_CAPACITY / (end - start)); + int start = static_cast<int>(log(first_point_speed)); + int end = static_cast<int>(log(last_point_speed)); + int num = static_cast<int>(LUT_CAPACITY / (end - start)); range = fp_rep_range{ start, end, num }; last_log_lookup_index = num * (end - start) - 1; |