allocate curve length vec with capacity

This commit is contained in:
MaxOhn
2021-11-13 17:28:26 +01:00
parent d39d9ae426
commit 1a7127be7f
2 changed files with 4 additions and 5 deletions
+2 -4
View File
@@ -174,10 +174,8 @@ impl<'h> DifficultyObject<'h> {
// * this finds the positional delta from the required
// * radius and the current position, and updates the
// * currCursorPosition accordingly, as well as rewarding distance.
curr_cursor_pos = curr_cursor_pos
+ curr_movement
* ((curr_movement_len - required_movement) / curr_movement_len)
as f32;
curr_cursor_pos += curr_movement
* ((curr_movement_len - required_movement) / curr_movement_len) as f32;
curr_movement_len *=
(curr_movement_len - required_movement) / curr_movement_len;