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) }