Commit b9899826 authored by Daniel Brown's avatar Daniel Brown

Fixing lens ABCD when setting diopters to zero

parent 18da7346
...@@ -1441,7 +1441,10 @@ class lens(Component): ...@@ -1441,7 +1441,10 @@ class lens(Component):
if self.f.value is not None: if self.f.value is not None:
return ABCD.lens(self.f.value) return ABCD.lens(self.f.value)
else: else:
return ABCD.lens(1/self.p.value) if self.p.value == 0:
return ABCD.lens(np.inf)
else:
return ABCD.lens(1/self.p.value)
def nodeConnections(self): def nodeConnections(self):
return ( return (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment