Fix CubicCurve::iter_samples iteration count#8049
Conversation
|
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
|
I'm not sure the docs are right here. The docs essentially say that "subdivisions" is the count of the number of "sections". However in my experience "subdivisions" is a count of the number of dividing lines. 1 subdivision = 2 sections, 2 subdivisions = 3 sections. Blender avoids this by using "number of cuts" terminology instead of "subdivisions". Godot calls this "subdivisions". We also call this "subdivisions" for the Plane shape. Imo we should either:
|
|
I agree that the terminology may be unclear and may need to be aligned with other parts from bevy. However, I still think this PR has value in the short term regardless, since currently all methods like |
|
Ok I buy that! |
# Objective Fix `CubicCurve::iter_samples` iteration count. ## Solution If I understand the function and the docs correctly, this should iterate over `0..=subdivisions` instead of `0..subdivisions`. For example: Now the iteration returns 3 points at `subdivisions = 2`, as indicated in the documentation.
Objective
Fix
CubicCurve::iter_samplesiteration count.Solution
If I understand the function and the docs correctly, this should iterate over
0..=subdivisionsinstead of0..subdivisions.For example: Now the iteration returns 3 points at
subdivisions = 2, as indicated in the documentation.