@fimbul-works/vec
Version:
A comprehensive TypeScript vector math library providing 2D, 3D, and 4D vector operations with a focus on performance and type safety.
17 lines (16 loc) • 477 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromCylindricalCoords = void 0;
/**
* Creates a vector from cylindrical coordinates.
* @param {number} r - Radius
* @param {number} phi - Angle in radians
* @param {number} z - Vector z axis
* @returns {ArrayVector3D} Vector
*/
const fromCylindricalCoords = (r, phi, z) => [
r * Math.cos(phi),
r * Math.sin(phi),
z,
];
exports.fromCylindricalCoords = fromCylindricalCoords;