Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


operator /(Vector3, float)

Divides a vector by a number.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Operator
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static Vector3 operator /(Vector3 a, float d)

Parameters

The vector to divide by
d
.

The number to divide by.

Returns

Type

Description

Vector3

Remarks

Divides each component of
a
by a number
d
.

Examples

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); }}