Difference between revisions of "VectorA:mul"
From ComputerCraft Wiki
(Changing int to number) |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
{{Function | {{Function | ||
− | |name=vector: | + | |name=vector:mul |
− | |args= | + | |args={{type|number}} multiplier |
|returns=[[vector (API)|vector]] | |returns=[[vector (API)|vector]] | ||
|api=vector | |api=vector | ||
Line 14: | Line 14: | ||
local c = a:mul(b) | local c = a:mul(b) | ||
+ | --local c = a * b | ||
print(c.x) | print(c.x) | ||
Line 35: | Line 36: | ||
[[Category:API_Functions]] | [[Category:API_Functions]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 13:11, 18 July 2013
Function vector:mul | |
Multiplies a vector with a scalar and returns the resulting vector. | |
Syntax | vector:mul(number multiplier) |
Returns | vector |
Part of | ComputerCraft |
API | vector |
Examples