tapspace
Version:
A zoomable user interface lib for web apps
25 lines (21 loc) • 399 B
JavaScript
const Vector = require('../../geometry/Vector')
module.exports = function (x, y, z) {
// @Component:getVector(x, y[, z])
//
// Create a Vector on this basis.
//
// Parameters
// x
// a number
// y
// a number
// z
// optional number, default to zero.
//
// Return
// a Vector
//
// Default
z = z || 0
return new Vector(this, { x, y, z })
}