Divides a vector by a number.
Divides each component of a
by a number d
.
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { void Example() { // make the vector twice shorter: prints (0.5,1.0,1.5) print(new Vector3(1, 2, 3) / 2.0F); } }
Divides two vectors component-wise.
Every component in the result is a component of a
divided by the same component of b
.
// Calculate the two vectors generating a result. // This will compute Vector3(1.5, 1, 0.5)
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { void Example() { print(new Vector3(3, 2, 1) / new Vector3(2, 2, 2)); } }