Revision Difference
Vector:Mul#512426
<function name="Mul" parent="Vector" type="classfunc">⤶
<description>Scales the vector by the given number, that means x, y and z are multiplied by that value.</description>⤶
<realm>Shared</realm>⤶
<args>⤶
<arg name="multiplier" type="number">The value to scale the vector with.</arg>⤶
</args>⤶
</function>⤶
⤶
<example>⤶
<description>Scales a vector by 250.</description>⤶
<code>⤶
a = Vector(1, 1, 1)⤶
a:Mul(250)⤶
print(a)⤶
</code>⤶
<outputfixedwidth>Fixed width</outputfixedwidth>⤶
<output>250 250 250</output>⤶
⤶
</example>⤶
⤶
⤶
<example>⤶
<description>If you don't want to set your vector to the result, and just return a new vector as the result. You can use a ' * ' operator to multiply a vector with a scalar.</description>⤶
<code>⤶
a = Vector(1, 1, 1)⤶
print(a*250)⤶
</code>⤶
<outputfixedwidth>Fixed width</outputfixedwidth>⤶
<output>250 250 250</output>⤶
⤶
</example>