Allow float32 residue roundoff in versor construction
This commit is contained in:
parent
79e28c5835
commit
2e8169bbb0
1 changed files with 3 additions and 0 deletions
|
|
@ -70,4 +70,7 @@ def versor_unit_residual(v: np.ndarray, *, allow_negative: bool = False) -> floa
|
||||||
minus = vv.copy()
|
minus = vv.copy()
|
||||||
minus[0] += 1.0
|
minus[0] += 1.0
|
||||||
return min(plus_residual, float(np.linalg.norm(minus)))
|
return min(plus_residual, float(np.linalg.norm(minus)))
|
||||||
|
|
||||||
|
|
||||||
|
def versor_condition(v: np.ndarray) -> float:
|
||||||
return versor_unit_residual(v, allow_negative=False)
|
return versor_unit_residual(v, allow_negative=False)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue