@@ -355,25 +355,25 @@ module.exports = function ({ cv, utils }) {
355
355
operatorRequiresArg ( 'absdiff' ) ;
356
356
357
357
it ( 'apply absdiff to matrices' , ( ) => {
358
- assertPropsWithValue ( new cv . Vec ( 0 , 100 , 50 , 25 , 150 , 10 ) . absdiff ( new cv . Vec ( 50 , 25 , 75 , 25 , 50 , 20 ) ) ) ( { u : 50 , v : 75 , w : 25 , x : 0 , y : 50 , z : 10 } ) ;
358
+ assertPropsWithValue ( new cv . Vec ( 0 , 100 , 50 , 25 , 150 , 10 ) . absdiff ( new cv . Vec ( 50 , 25 , 75 , 25 , 50 , 20 ) ) ) ( { u : 50 , v : 75 , w : 25 , x : 0 , y : 100 , z : 10 } ) ;
359
359
} ) ;
360
360
} ) ;
361
361
362
362
describe ( 'exp' , ( ) => {
363
363
it ( 'apply exp to vector' , ( ) => {
364
- assertPropsWithValue ( new cv . Vec ( Math . log ( 1 ) , Math . log ( 4 ) , 0 , Math . log ( 0 ) , Math . log ( 3 ) , Math . log ( 2 ) ) . exp ( ) ) ( { u : 1 , v : 4 , w : 1 , x : 0 , y : 3 , z : 2 } ) ;
364
+ assertPropsWithValue ( new cv . Vec ( Math . log ( 1 ) , Math . log ( 4 ) , 0 , Math . log ( 0 ) , Math . log ( 4 ) , Math . log ( 4 ) ) . exp ( ) ) ( { u : 1 , v : 4 , w : 1 , x : 0 , y : 4 , z : 4 } ) ;
365
365
} ) ;
366
366
} ) ;
367
367
368
368
describe ( 'sqrt' , ( ) => {
369
369
it ( 'apply sqrt to vector' , ( ) => {
370
- assertPropsWithValue ( new cv . Vec ( 0 , 4 , 16 , 64 , 255 , 510 ) . sqrt ( ) ) ( { u : 0 , v : 2 , w : 4 , x : 8 , y : 16 , z : 32 } ) ;
370
+ assertPropsWithValue ( new cv . Vec ( 0 , 4 , 16 , 64 , 256 , 1024 ) . sqrt ( ) ) ( { u : 0 , v : 2 , w : 4 , x : 8 , y : 16 , z : 32 } ) ;
371
371
} ) ;
372
372
} ) ;
373
373
374
374
describe ( 'norm' , ( ) => {
375
375
it ( 'should return magnitude' , ( ) => {
376
- expect ( new cv . Vec ( Math . sqrt ( 4 ) , Math . sqrt ( 4 ) , Math . sqrt ( 4 ) , Math . sqrt ( 4 ) , Math . sqrt ( 4 ) , Math . sqrt ( 4 ) ) . norm ( ) ) . to . equal ( 4 ) ;
376
+ expect ( new cv . Vec ( Math . sqrt ( 8 ) , Math . sqrt ( 8 ) , Math . sqrt ( 8 ) , Math . sqrt ( 8 ) , Math . sqrt ( 16 ) , Math . sqrt ( 16 ) ) . norm ( ) ) . to . equal ( 8 ) ;
377
377
} ) ;
378
378
} ) ;
379
379
} ) ;
0 commit comments