Vector4.operator * 运算符 乘法
static operator * (a : Vector4, d : float) : Vector4
Description描述
Multiplies a vector by a number.
一个向量乘以一个数字。
Multiplies each component of a by a number d.
向量a的每一个组件乘以数字d。
C#
JavaScript
using UnityEngine;using System.Collections;public class example : MonoBehaviour {public void Awake() {print(new Vector4(1, 2, 3, 4) * 2.0F);}}
// make the vector twice longer: prints (2.0,4.0,6.0,8.0)// 使向量变为2倍长 : prints (2.0,4.0,6.0,8.0)。print (Vector4(1,2,3,4) * 2.0);
• static operator * (d : float, a : Vector4) : Vector4
Description描述
Multiplies a vector by a number.
一个数字乘以一个向量。
Multiplies each component of a by a number d.
数字d乘以向量a的每一个组件。
C#
JavaScript
using UnityEngine;using System.Collections;public class example : MonoBehaviour {public void Awake() {print(2.0F * new Vector4(1, 2, 3, 4));}}
// make the vector twice longer: prints (2.0,4.0,6.0,8.0)// 使向量变为2倍长 : prints (2.0,4.0,6.0,8.0)。print (2.0 * Vector4(1,2,3,4));