Unclear behavior or bug in the Arc length option
Nightwarden24 opened this issue · 1 comments
There is a dynamic group with t (t>=2) children. Value of the Grow option is counter clockwise or clockwise; Constant factor - radius. If I set the Arc length to n (n<360) degrees, t items will be at n/t degrees apart instead of n/(t-1). As a result, arc with an angle of less than n degrees will be formed by these items.
From discussion in Discord:
- Nightwarden: rivers
- Could you rename the Arc length option? It's an angle, and length is not measured in degrees.
- You made mistake in line 608, 651 in the file WeakAuras/RegionTypes/DynamicGroup.lua. It should be divided by (numVisible-1) because the number of spaces/gaps between n objects is (n-1), not n.
- rivers: I’m not normally opposed to changing names, but I don’t know about this one. So far, I haven’t seen anyone not understand what the option is supposed to do, where that misunderstanding could only be attributed to its name.
- rivers: Additionally, since we don’t support arbitrary curves (without writing code, anyways), it is reasonable to speak of the angle as an arc length, just as we usually use kilograms when talking about weight even though it should be some scaling of newtons instead
- rivers: As for your second point, if I went with what you say, then the first and last element would always fully overlap when the user uses a constant radius arc, and allows the curve to span the full circle
- rivers: e.g. with 3 items visible, we would expect them to be 120 degrees apart. If we used your suggestion then they would be 360/(3-1) = 180 degrees apart, which would be a bug. Users would complain that “one of the items is always missing”
- rivers: So, if you did notice a bug in the behavior, you have either mis-identified the source, or were not specific enough
- rivers: Hmm, well at least in the Anglo-sphere we use kilograms to measure weight instead of newtons. I don’t know about other languages
- Nightwarden: Case of 360 degrees (full circle) can be considered separately. Right now, if I set arc length to 90 degrees, 2 items will be at 45 degrees apart instead of 90.
- rivers: Ok, then the correct solution is to grant 2π-θ radians (where θ is the arc length that the user chose) to the gap between the last and first element
- rivers: And evenly size the remaining gaps
- rivers: Can you write a ticket for that?
- Nightwarden: No :slight_smile:
- Nightwarden: ctr+c ctr+v from discord chat
- rivers: Hmm I suppose that my code already implicitly does that
- rivers: So, then this needs to be a new option
Link in code - WeakAuras/RegionTypes/DynamicGroup.lua; lines 567, 608
Since shadowlands beta is now upon us, i suppose I should actually address this now...
I'll go ahead and add a "Full circle" toggle to the dynamic group circular layout. If checked, then the current behavior will be maintained, but the angle will be locked at, well, a full circle. If not checked, then your proposed behavior will be used.
In the interest of backwards compatibility, we will migrate with the heuristic that if somebody has an angle of less than a full circle, they want your proposed behavior, otherwise, they want the current behavior.