Part of StarfallEx namespace
๐ External
math.unitConversion(to, from)๐ Has LDoc๐๏ธ 0 viewsUpdated 2 months ago
Description
Provides a conversion factor given input units Example: local mph = math.unitConversion(UNIT.MILE / UNIT.HOUR) local converted = x * mph
Parameters
| Name | Type | Description |
|---|---|---|
to | number | the UNIT to convert the number to |
from? | number | the UNIT to convert the number from (Default: 1, works if converting from gmod natural units) |
Returns
| Type | Description |
|---|---|
number | A conversion factor multipled by values to convert units |
Examples
No examples available.
Used In
No usages found in the codebase.