All files / src/projection/geometry utils.ts

80% Statements 4/5
25% Branches 2/8
66.67% Functions 2/3
80% Lines 4/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19      1x     37x 1x     37x                
import { AxisDelta, Box, Delta } from "./types"
 
function isAxisDeltaZero(delta: AxisDelta) {
    return delta.translate === 0 && delta.scale === 1
}
 
export function isDeltaZero(delta: Delta) {
    return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y)
}
 
export function boxEquals(a: Box, b: Box) {
    return (
        a.x.min === b.x.min &&
        a.x.max === b.x.max &&
        a.y.min === b.y.min &&
        a.y.max === b.y.max
    )
}