Vector4.Scale 缩放


function Scale (scale : Vector4) : void

Description描述

Multiplies every component of this vector by the same component of scale.

由缩放的相同的组件对应乘以这个矢量的每个组件。

• static function Scale (a : Vector4, b : Vector4) : Vector4

Multiplies two vectors component-wise.

两个矢量组件对应相乘。

Every component in the result is a component of a multiplied by the same component of b.

结果每个组件是有相同名字a的组件和相同名字b的组件分别相乘。

  • C#

  • JavaScript

using UnityEngine;using System.Collections;public class example : MonoBehaviour {public void Awake() {print(Vector4.Scale(new Vector4(1, 2, 3, 4), new Vector4(2, 3, 4, 5)));}}
// prints (2.0,6.0,12.0,20.0)print (Vector4.Scale (Vector4(1,2,3,4), Vector4(2,3,4,5)));


,