Vector2.operator *
Declaration
public static Vector2 operator *(Vector2 a, float d);Описание
Умножает вектор на число.
Умножает каждый компонент a на число d.
using UnityEngine;
public class Example : MonoBehaviour { void Start() { // make the vector twice longer: prints (2.0,4.0) print(new Vector2(1, 2) * 2.0f); } }
Declaration
public static Vector2 operator *(float d, Vector2 a);Описание
Умножает вектор на число.
Умножает каждый компонент a на число d.
using UnityEngine;
public class Example : MonoBehaviour { void Start() { // make the vector twice longer: prints (2.0,4.0) print(2.0f * new Vector2(1, 2)); } }
Declaration
public static Vector2 operator *(Vector2 a, Vector2 b);Описание
Умножает вектор на другой вектор.
Умножает каждый компонент a на его соответствующий компонент из b.