Skip to content

Instantly share code, notes, and snippets.

View domlander's full-sized avatar

Dominik Lander domlander

  • London, United Kingdom
View GitHub Profile
/**
* Converts a numerical aspect ratio (e.g. 1.77) to a string representation (e.g. '16:9')
* Created by Copilot
*/
const convertAspectRatioToString = (aspectRatio: number): string => {
if (!Number.isFinite(aspectRatio) || aspectRatio <= 0) {
return '16:9';
}