From 9db9d4f8897f55c995b35b637bd899ab994aff85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?b=CA=B0edoh=E2=82=82=20sw=C3=A9?= Date: Thu, 11 Apr 2024 00:58:27 +0500 Subject: [PATCH] Add exception handling to MobiusInt. --- gyro.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gyro.py b/gyro.py index e2831fa..c4e429c 100644 --- a/gyro.py +++ b/gyro.py @@ -37,7 +37,10 @@ def cDist(cA, cB): @jit(cache=True) def MobiusInt(cA,cB,cC,cD): # Bruh - return Klein2Poincare(cLineIntersection(Poincare2Klein(cA),Poincare2Klein(cB),Poincare2Klein(cC),Poincare2Klein(cD))) + try: + return Klein2Poincare(cLineIntersection(Poincare2Klein(cA),Poincare2Klein(cB),Poincare2Klein(cC),Poincare2Klein(cD))) + except: + return 0j @jit(cache=True) def MobiusBetween(cA,cB,cN):