Skip to content

Commit 5db95e4

Browse files
committed
add missing partition tests and missing typings. Fix typo in vec4 typo
1 parent 2940c20 commit 5db95e4

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

lib/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export * from './typings/Vec.d';
66
export * from './typings/Vec2.d';
77
export * from './typings/Vec3.d';
88
export * from './typings/Vec4.d';
9+
export * from './typings/Vec6.d';
910
export * from './typings/Point.d';
1011
export * from './typings/Point2.d';
1112
export * from './typings/Point3.d';

lib/typings/Vec4.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Vec } from './Vec.d';
22

33
export class Vec4 extends Vec {
4+
readonly w: number;
45
readonly x: number;
56
readonly y: number;
67
readonly z: number;
7-
readonly w: number;
8-
constructor(x: number, y: number, z: number, w: number);
8+
constructor(w: number, x: number, y: number, z: number);
99
}

lib/typings/cv.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Size } from './Size.d';
33
import { Vec2 } from './Vec2.d';
44
import { Vec3 } from './Vec3.d';
55
import { Vec4 } from './Vec4.d';
6+
import { Vec6 } from './Vec6.d';
67
import { Point2 } from './Point2.d';
78
import { Point3 } from './Point3.d';
89
import { KeyPoint } from './KeyPoint.d';
@@ -139,6 +140,7 @@ export function partition(data: Point3[], predicate: (pt1: Point3, pt2: Point3)
139140
export function partition(data: Vec2[], predicate: (vec1: Vec2, vec2: Vec2) => boolean): { labels: number[], numLabels: number };
140141
export function partition(data: Vec3[], predicate: (vec1: Vec3, vec2: Vec3) => boolean): { labels: number[], numLabels: number };
141142
export function partition(data: Vec4[], predicate: (vec1: Vec4, vec2: Vec4) => boolean): { labels: number[], numLabels: number };
143+
export function partition(data: Vec6[], predicate: (vec1: Vec6, vec2: Vec6) => boolean): { labels: number[], numLabels: number };
142144
export function partition(data: Mat[], predicate: (mat1: Mat, mat2: Mat) => boolean): { labels: number[], numLabels: number };
143145
export function perspectiveTransform(mat: Mat, m: Mat): Mat;
144146
export function perspectiveTransformAsync(mat: Mat, m: Mat): Promise<Mat>;

test/tests/core/coreTests.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ module.exports = function ({ cv, utils }) {
8282
partitionTests(() => new cv.Vec(0, 0, 0, 0));
8383
});
8484

85+
describe('Vec6 input', () => {
86+
partitionTests(() => new cv.Vec(0, 0, 0, 0, 0, 0));
87+
});
88+
8589
describe('Mat input', () => {
8690
partitionTests(() => new cv.Mat());
8791
});

0 commit comments

Comments
 (0)