Skip to content

Conversation

msz-rai
Copy link
Contributor

@msz-rai msz-rai commented May 30, 2023

Float to int conversion drops the fractional part of the number. For some nicely divisible values, it understates the result (e.g., 0.2 degrees of resolution: 360 / 0.2 = 1800, but it returns 1799). I used Math.Round to fix it.

@msz-rai msz-rai requested a review from mackierx111 May 30, 2023 14:34
@msz-rai msz-rai marked this pull request as ready for review May 30, 2023 14:34
Copy link
Collaborator

@mackierx111 mackierx111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM👍

@mackierx111 mackierx111 merged commit 71dd44b into main May 31, 2023
@mackierx111 mackierx111 deleted the fix/lidar-horizontal-resolution branch May 31, 2023 03:45
tzu-lin-huang pushed a commit to OptiVerse-Technology-Ltd/AWSIM that referenced this pull request Aug 26, 2025
Fix horizontal steps calculation from the horizontal resolution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants