参考 fromAngle()

fromAngle()

Creates a new 2D vector from an angle.

示例

语法

fromAngle(angle, [length])

参数

angle
Number:

desired angle, in radians. Unaffected by angleMode().

length
Number:

length of the new vector (defaults to 1).

Returns

p5.Vector: new p5.Vector object.
Notice any errors or typos? Please let us know. Please feel free to edit src/math/p5.Vector.js and open a pull request!

相关参考