Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Last active July 25, 2021 00:13
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save parzibyte/51b404936a19546e4d0b18549c74272b to your computer and use it in GitHub Desktop.
const centimetrosAPixeles = (centimetros, dpi) => {
const centimetrosPorPulgada = dpi / 2.54;
return centimetrosPorPulgada * centimetros;
};
const anchoEnPixeles = centimetrosAPixeles(2.5, 72);
console.log(anchoEnPixeles);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment