kcl →
fromFt
Converts a number from feet to the current default unit.
No matter what units the current file uses, this function will always return a number equivalent to the input in feet.
For example, if the current file uses inches, fromFt(1)
will return 12
. If the current file uses millimeters, fromFt(1)
will return 304.8
. If the current file uses feet, fromFt(1)
will return 1
.
Caution: This function is only intended to be used when you absolutely MUST have different units in your code than the file settings. Otherwise, it is a bad pattern to use this function.
We merely provide these functions for convenience and readability, as fromFt(10)
is more readable that your intent is "I want 10 feet" than 10 * 304.8
, if the file settings are in millimeters.
fromFt(input: number): number
Tags
units
Arguments
Name | Type | Description | Required |
---|---|---|---|
input | number | Yes |
Returns
Examples
totalWidth = fromFt(10)