Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
Capsule2d::sample_interior
(#15191)
# Objective `Capsule2d::sample_interior` uses the radius of the capsule for the width of its rectangular section. It should be using two times the radius for the full width! I noticed this as I was getting incorrect results for angular inertia approximated from a point cloud of points sampled on the capsule. This hinted that something was wrong with the sampling. ## Solution Multiply the radius by two to get the full width of the rectangular section. With this, the sampling produces the correct result in my tests.
- Loading branch information