Builder |
Accessor |
Length |
---|---|---|
Metric |
||
Length.angstroms |
Length.inAngstroms |
\[ 1 * 10^{-10} \, Meters \] |
Length.nanometers |
Length.inNanometers |
\[ 1 * 10^9 \, Meters \] |
Length.microns |
Length.inMicrons |
\[ 1 * 10^{-6} \, Meters \] |
Length.millimeters |
Length.inMillimeters |
\[ 0.001 \, Meters \] |
Length.centimeters |
Length.inCentimeters |
\[ 0.01 \, Meters \] |
Length.kilometers |
Length.inKilometers |
\[ 1000 \, Meters \] |
Imperial |
||
Length.inch |
Length.inInches |
\[ 0.0254 \, Meters \] |
Length.feet |
Length.inFeet |
\[ 12 \, Inches \] |
Length.yards |
Length.inYards |
\[ 3 \, Feet \] |
Length.thou |
Length.inThou |
\[ 0.001 \, Inches \] |
Length.miles |
Length.inMiles |
\[ 5280 \, Feet \] |
Astronomical Units |
||
Length.astronomicalUnits |
Length.inAstronomicalUnits |
\[ \approx 1.50 * 10^{11} \, Meters \] |
Length.lightYears |
Length.inLightYears |
\[ \approx 9.46 * 10^{15} \, Meters \] |
Length.parsecs |
Length.inParsecs |
\[ 648000 \pi \, Astronomical \, Units \] |
Digital |
||
Length.cssPixels |
Length.inCssPixels |
\[ \frac{1}{96} \, Inches \] |
Length.points |
Length.inPoints |
\[ \frac{1}{72} \, Inches \] |
Length.picas |
Length.inPicas |
\[ \frac{1}{6} \, Inches \] |
Operator |
Lhs |
Rhs |
Return Type |
Example |
Function |
---|---|---|---|---|---|
- |
Length |
Length |
|
|
|
+ |
Length |
Length |
Length |
|
|
- |
Length |
Length |
Length |
|
|
* |
Length |
float |
Length |
|
|
* |
float |
Length |
Length |
|
None |
* |
Angle |
Length |
Length |
|
None |
* |
Length |
Angle |
Length |
|
None |
/ |
Length |
float |
Length |
|
|
/ |
Angle |
Length |
Length |
|
None |
/ |
Length |
Angle |
Length |
|
None |
let length = Length.meters 10.
Length.squared length
|
let lengthSquared = Length.meters 3. * Length.meters 12.
Length.sqrt lengthSquared
|
Length.twice length = 2. * length
Length.half length = 0.5 * length
Length.half length = length / 2.
Round to the nearest 10th digit. You can read more about digit precision
Length.round (Length.meters 0.123456789123456789)
|
Length.roundTo 3 (Length.meters 0.11111)
|
Length.min (Length.meters 3.) (Length.meters 4.)
|
Length.max (Length.meters 3.) (Length.meters 4.)
|
Length.sum [ Length.meters 1.; Length.meters 2. ]
|
|