Length returns the length of this vector.
()
| 407 | |
| 408 | // Length returns the length of this vector. |
| 409 | func (v *Vector4) Length() float32 { |
| 410 | |
| 411 | return Sqrt(v.X*v.X + v.Y*v.Y + v.Z*v.Z + v.W*v.W) |
| 412 | } |
| 413 | |
| 414 | // Normalize normalizes this vector so its length will be 1. |
| 415 | // Returns the pointer to this updated vector. |