Beispiel #1
0
 def test_normalized(self):
     x = (0, 1, 2)
     x0 = mat.normalized(x)
     self.assertTrue(np.equal(1, np.dot(x0, x0) ** .5))
Beispiel #2
0
 def decompose(p):
     n = mat.normalized(axis)
     p = p[:3] - center
     pn = p.dot(n) * n
     return pn, p - pn