Add helper function and remove clutter

This commit is contained in:
schmelczerandras 2020-10-13 22:32:39 +02:00
parent 5ff15fa58f
commit 4629cfd469
2 changed files with 9 additions and 3 deletions

View file

@ -0,0 +1,7 @@
/**
* @internal
*
* Returns non-numbers as is.
*/
export const numberToGlslFloat = (value: number | string): string =>
Number.isInteger(value) ? `${value}.0` : value.toString();