[instancer.solver] Add a special case
This commit is contained in:
parent
245c3e9575
commit
52c791ad1d
@ -87,6 +87,10 @@ def _solve(tent, axisLimit):
|
||||
# we clamp +2.0 to the max F2Dot14 (~1.99994) for convenience
|
||||
upper = axisDef + (axisMax - axisDef) * MAX_F2DOT14
|
||||
|
||||
# Special-case if peak is at axisMax.
|
||||
if axisMax == peak:
|
||||
upper = peak
|
||||
|
||||
loc = (max(axisDef, lower), peak, upper)
|
||||
|
||||
# Don't add a dirac delta!
|
||||
|
@ -181,6 +181,18 @@ class RebaseTentTest(object):
|
||||
(1, (1, 1, 1)),
|
||||
]
|
||||
),
|
||||
pytest.param(
|
||||
(.5, .5, .5), (.25, .35, .5),
|
||||
[
|
||||
(1, (1, 1, 1)),
|
||||
]
|
||||
),
|
||||
pytest.param(
|
||||
(.5, .5, .55), (.25, .35, .5),
|
||||
[
|
||||
(1, (1, 1, 1)),
|
||||
]
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_rebaseTent(self, tent, axisRange, expected):
|
||||
|
Loading…
x
Reference in New Issue
Block a user