Divides a vector by a scalar. The version of the method that uses a float acts directly on the vector upon which it is called (as in the first example above). The version that receives both a PVector and a float as arguments is a static methods, and returns a new PVector that is
(float n)
| 611 | * @param n the number by which to divide the vector |
| 612 | */ |
| 613 | public PVector div(float n) { |
| 614 | x /= n; |
| 615 | y /= n; |
| 616 | z /= n; |
| 617 | return this; |
| 618 | } |
| 619 | |
| 620 | |
| 621 | /** |