Scale
Multiplies two vectors component-wise.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
Scale(Vector4, Vector4)
Multiplies two vectors component-wise.
public static Vector4 Scale(Vector4 a, Vector4 b)
Parameters
Returns
Type | Description |
|---|---|
| Vector4 | A vector in which each component is the product of the corresponding components of |
Remarks
Every component in the result is a component of multiplied by the same component of .
abExamples
using UnityEngine;public class Example : MonoBehaviour{ void Start() { // prints (2.0,6.0,12.0,20.0) print(Vector4.Scale(new Vector4(1, 2, 3, 4), new Vector4(2, 3, 4, 5))); }}
Scale(Vector4, Vector4)
Multiplies two vectors component-wise.
public static Vector4 Scale(in Vector4 a, in Vector4 b)
Parameters
Returns
Type | Description |
|---|---|
| Vector4 | A vector in which each component is the product of the corresponding components of |
Remarks
Every component in the result is a component of multiplied by the same component of .
abExamples
using UnityEngine;public class Example : MonoBehaviour{ void Start() { // prints (2.0,6.0,12.0,20.0) print(Vector4.Scale(new Vector4(1, 2, 3, 4), new Vector4(2, 3, 4, 5))); }}
Scale(Vector4)
Multiplies every component of this vector by the same component of .
scalepublic void Scale(Vector4 scale)
Parameters
The vector to multiply this vector by, component by component.
Scale(Vector4)
Multiplies every component of this vector by the same component of .
scalepublic void Scale(in Vector4 scale)
Parameters
The vector to multiply this vector by, component by component.