[instancer/L4] Fix crossing calculation
This commit is contained in:
parent
060b5f36bf
commit
023ad3a363
@ -100,7 +100,7 @@ def _solve(tent, axisLimit, negative=False):
|
||||
if gain > outGain:
|
||||
|
||||
# Crossing point on the axis.
|
||||
crossing = peak + ((1 - gain) * (upper - peak) / (1 - outGain))
|
||||
crossing = peak + (1 - gain) * (upper - peak)
|
||||
|
||||
loc = (axisDef, peak, crossing)
|
||||
scalar = 1
|
||||
|
@ -91,6 +91,25 @@ class RebaseTentTest(object):
|
||||
(-1, (-1, -1, 0)),
|
||||
],
|
||||
),
|
||||
pytest.param(
|
||||
(0.0, 0.5, 1),
|
||||
(0, 0.5, 0.75),
|
||||
[
|
||||
(1, None),
|
||||
(-0.5, (0, 1, 1)),
|
||||
(-1, (-1, -1, 0)),
|
||||
],
|
||||
),
|
||||
pytest.param(
|
||||
(0.0, 0.5, 1),
|
||||
(0, 0.25, 0.8),
|
||||
[
|
||||
(0.5, None),
|
||||
(0.5, (0, 0.45454545, 0.9090909090)),
|
||||
(-0.1, (0.9090909090, 1.0, 1.0)),
|
||||
(-0.5, (-1, -1, 0)),
|
||||
],
|
||||
),
|
||||
# Case 3a/1neg
|
||||
pytest.param(
|
||||
(0.0, 0.5, 2),
|
||||
|
Loading…
x
Reference in New Issue
Block a user