@@ -64,10 +64,10 @@ function compareNumbers(number1, number2, message, precision) {
6464 Format . number ( number2 , precision ) , message ) ;
6565}
6666
67- function compareArrays ( array1 , array2 , message ) {
67+ function compareArrays ( array1 , array2 , message , precision ) {
6868 function format ( array ) {
6969 return Base . each ( array , function ( value , index ) {
70- this [ index ] = Format . number ( value ) ;
70+ this [ index ] = Format . number ( value , precision ) ;
7171 } , [ ] ) . toString ( ) ;
7272 }
7373 equals ( format ( array1 ) , format ( array2 ) , message ) ;
@@ -85,12 +85,12 @@ function compareRectangles(rect1, rect2, message) {
8585 compareNumbers ( rect1 . height , rect2 . height , ( message || '' ) + ' height' ) ;
8686}
8787
88- function compareColors ( color1 , color2 , message ) {
88+ function compareColors ( color1 , color2 , message , precision ) {
8989 color1 = new Color ( color1 ) ;
9090 color2 = new Color ( color2 ) ;
9191 equals ( color1 . type , color2 . type , ( message || '' ) + ' type' ) ;
9292 compareArrays ( color1 . components , color2 . components ,
93- ( message || '' ) + ' components' ) ;
93+ ( message || '' ) + ' components' , precision ) ;
9494}
9595
9696function comparePathStyles ( style , style2 , checkIdentity ) {
0 commit comments