Add helper function and remove clutter
This commit is contained in:
parent
5ff15fa58f
commit
4629cfd469
2 changed files with 9 additions and 3 deletions
7
src/helper/number-to-glsl-float.ts
Normal file
7
src/helper/number-to-glsl-float.ts
Normal 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();
|
||||
Loading…
Add table
Add a link
Reference in a new issue