JX.$V(x, y)Javelin Documentation ()
JX.$V(x, y)
Javelin Documentation ()
Convenience function that returns a JX.Vector instance. This allows you to concisely write things like:
JX.$V(x, y).add(10, 10); Explicit coordinates. JX.$V(node).add(50, 50).setDim(node); Position of a node.
Parameters
| number|Node | x | If a node, returns the node's position vector. If numeric, the x-coordinate for the new vector. |
| number? | y | The y-coordinate for the new vector. |
Return
| JX.Vector | New vector. |
- Defined
- lib/Vector.js:25