UNPKG

@thi.ng/vectors

Version:

Optimized 2d/3d/4d and arbitrary length vector operations, support for memory mapping/layouts

39 lines 1.26 kB
import { type MultiVecOpVO, type ReadonlyVec, type Vec } from "./api.js"; /** * Converts polar vector `v` to cartesian coordinates and adds optional * `offset`. See {@link polar} for reverse operation. If `out` is null, modifies * `v` in place. * * @param out - * @param v - * @param offset - */ export declare const cartesian: MultiVecOpVO<ReadonlyVec>; /** * Converts 2D polar vector `v` to cartesian coordinates and adds optional * `offset`. See {@link polar2} for reverse operation. If `out` is null, * modifies `v` in place. * * @param out - * @param v - * @param offset - */ export declare const cartesian2: import("./api.js").VecOpVO<ReadonlyVec>; /** * Converts 3D polar vector `v` to cartesian coordinates and adds optional * `offset`. See {@link polar3} for reverse operation. If `out` is null, * modifies `v` in place. * * @param out - * @param v - * @param offset - */ export declare const cartesian3: import("./api.js").VecOpVO<ReadonlyVec>; /** * Converts given vector of angles (in radians) to an array of 2D cartesian * coordinates scaled by `n` (default: 1). * * @param angles */ export declare const cartesian2FromAngles: (angles: ReadonlyVec, n?: number) => Vec<number>[]; //# sourceMappingURL=cartesian.d.ts.map