bevy/crates/bevy_render/src/mesh/primitives
Robin KAY 28faafdc41
Fix tiny seam in Annulus geometry. (#14913)
# Objective

There is a tiny seam at the top of the annulus caused by normal
floating-point error in calculating the coordinates. When generating the
last pair of triangles, given `n == i` then `(TAU / n) * i` does not
equal `TAU` exactly.

Fixes https://github.com/komadori/bevy_mod_outline/issues/42

## Solution

This can be fixed by changing the calculation so that `(TAU / n) * (i %
n) == 0.0`, which is equivalent for trigonometric purposes.

## Testing

Added the unit test
`bevy_render::mesh::primitives::dim2::tests::test_annulus`.
2024-08-25 14:11:58 +00:00
..
dim3 Apply unused_qualifications lint (#14828) 2024-08-21 12:29:33 +00:00
dim2.rs Fix tiny seam in Annulus geometry. (#14913) 2024-08-25 14:11:58 +00:00
extrusion.rs Use u32 for resolution/subdivision in primitive meshing (#13930) 2024-06-20 00:58:21 +00:00
mod.rs Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00