normalizes this vector and returns it.
(self)
| 170 | self.__components[pos] = value |
| 171 | |
| 172 | def norm(self): |
| 173 | """ |
| 174 | normalizes this vector and returns it. |
| 175 | """ |
| 176 | eLength = self.eulidLength() |
| 177 | quotient = 1.0 / eLength |
| 178 | for i in range(len(self.__components)): |
| 179 | self.__components[i] = self.__components[i] * quotient |
| 180 | return self |
| 181 | |
| 182 | def __eq__(self, other): |
| 183 | """ |