All files / src/projection/geometry copy.ts

100% Statements 6/6
100% Branches 0/0
100% Functions 2/2
100% Lines 6/6

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 20 21 22              38x 158x 158x               38x 79x 79x    
import { Axis, Box } from "./types"
 
/**
 * Reset an axis to the provided origin box.
 *
 * This is a mutative operation.
 */
export function copyAxisInto(axis: Axis, originAxis: Axis) {
    axis.min = originAxis.min
    axis.max = originAxis.max
}
 
/**
 * Reset a box to the provided origin box.
 *
 * This is a mutative operation.
 */
export function copyBoxInto(box: Box, originBox: Box) {
    copyAxisInto(box.x, originBox.x)
    copyAxisInto(box.y, originBox.y)
}