np.linalg.norm -> get_norm

This commit is contained in:
Grant Sanderson
2018-08-15 17:30:24 -07:00
parent f926611d34
commit 365093c0b5
82 changed files with 310 additions and 281 deletions

View File

@ -3,6 +3,7 @@ import numpy as np
from constants import OUT
from utils.bezier import interpolate
from utils.space_ops import rotation_matrix
from utils.space_ops import get_norm
STRAIGHT_PATH_THRESHOLD = 0.01
@ -24,9 +25,9 @@ def path_along_arc(arc_angle, axis=OUT):
"""
if abs(arc_angle) < STRAIGHT_PATH_THRESHOLD:
return straight_path
if np.linalg.norm(axis) == 0:
if get_norm(axis) == 0:
axis = OUT
unit_axis = axis / np.linalg.norm(axis)
unit_axis = axis / get_norm(axis)
def path(start_points, end_points, alpha):
vects = end_points - start_points