math.vec3 ​Contract 2.0.0 · package sha256
a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e· generated frommath.d.tsbyservices/onsite-scripter/scripts/build-contract-docs.mjs; edit the source, not this file.
Const · import { vec3 } from '@holostep-configurators/runtime-client/math'; · stable · since 2.0.0 · section 23. /math
3D vectors and points.
| Member | Kind | Summary |
|---|---|---|
add |
method | a + b. |
sub |
method | a − b. |
scale |
method | a × s. |
dot |
method | The dot product. |
cross |
method | The cross product (right-handed). |
length |
method | The length. |
normalize |
method | The same direction at unit length; a zero-length vector returns { x: 0, y: 0, z: 0 }. |
distance |
method | The distance between two points. |
applyMat4 |
method | The point transformed by m. |
applyQuat |
method | The vector rotated by q. |
export const vec3: {
add(a: Point3, b: Point3): Point3;
sub(a: Point3, b: Point3): Point3;
scale(a: Point3, s: number): Point3;
dot(a: Point3, b: Point3): number;
cross(a: Point3, b: Point3): Point3;
length(a: Point3): number;
normalize(a: Point3): Point3;
distance(a: Point3, b: Point3): number;
applyMat4(a: Point3, m: Mat4): Point3;
applyQuat(a: Point3, q: Quat): Point3;
};
| Rule | Result |
|---|---|
| 1. Neutral name | pass: vec3 names no product |
| 2. A precedent | not recorded: no ledger row (coverage.json) names this member or its owner |
| 3. Two apps, or labs | not recorded: no ledger row names this member or its owner |
| 4. The cheaper fix first | not recorded per member (Appendix B decides it per need) |