def unitized(self): """Returns a quaternion with a unit-length. Examples -------- >>> q = Quaternion(1.0, 1.0, 1.0, 1.0) >>> q.is_unit False >>> p = q.unitized() >>> p.is_unit True """ qu = quaternion_unitize(self) return Quaternion(*qu)
def unitize(self): """Scales the quaternion to make it unit-length. Examples -------- >>> q = Quaternion(1.0, 1.0, 1.0, 1.0) >>> q.is_unit False >>> q.unitize() >>> q.is_unit True """ qu = quaternion_unitize(self) self.w, self.x, self.y, self.z = qu
def unitized(self): """Returns a quaternion with a unit-length. Returns ------- :class:`compas.geometry.Quaternion` Examples -------- >>> q = Quaternion(1.0, 1.0, 1.0, 1.0) >>> q.is_unit False >>> p = q.unitized() >>> p.is_unit True """ qu = quaternion_unitize(self) return Quaternion(*qu)
def unitized(self): """Returns a :obj:`Quaternion` with a unit-length. """ qu = quaternion_unitize(self) return Quaternion(*qu)
def unitize(self): """Scales the quaternion to make it unit-length. """ qu = quaternion_unitize(self) self.w, self.x, self.y, self.z = qu