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