aboutsummaryrefslogtreecommitdiff
path: root/src/model/size.ts
blob: 5e8a778b5b908fea672a1c6959cdab44c68b1cbd (plain)
1
2
3
4
5
6
7
8
export interface Size {
  width: number,
  height: number,
}

export function diagonal(size: Size): number {
  return Math.sqrt(size.width ** 2 + size.height ** 2)
}