Nasal library: Difference between revisions

Jump to navigation Jump to search
→‎Variables: Doc global variables. Feel free to fix any typos I haven't spotted.
(Prep for docing variables)
(→‎Variables: Doc global variables. Feel free to fix any typos I haven't spotted.)
Line 2,186: Line 2,186:


== Variables ==
== Variables ==
<!--
Various global constants (technically variables) are provided for use in converting between different units. They are all found in {{fgdata file|Nasal/globals.nas|text=$FG_ROOT/Nasal/globals.nas}}.
 
=== D2R ===
{{Nasal doc
|syntax = var radians = degrees * D2R;
|text = Converts an angle from degrees to radians when multiplied by the angle in degrees. Equal to <code>π / 180</code>.
}}
=== FPS2KT ===
{{Nasal doc
|syntax = var knots = feet_per_second * FPS2KT;
|text = Converts a velocity from feet per second to knots when multiplied by the velocity in feet per second. Approximately equal to 0.5925.
}}
=== FT2M ===
{{Nasal doc
|syntax = var metres = feet * FT2M;
|text = Converts a length from feet to metres when multiplied by the length in feet. Equal to 0.3048.
}}
=== GAL2L ===
{{Nasal doc
|syntax = var litres = gallons * GAL2L;
|text = Converts a volume from US liquid gallons to litres when multiplied by the volume in gallons. Approximately equal to 3.7854.
}}
=== IN2M ===
{{Nasal doc
|syntax = var metres = inches * IN2M;
|text = Converts a length from inches to metres when multiplied by the length in inches. Equal to 0.0254.
}}
=== KG2LB ===
{{Nasal doc
|syntax = var pounds = kilograms * KG2LB;
|text = Converts a mass from kilograms to pounds when multiplied by the mass in kilograms. Approximately equal to 2.2046.
}}
=== KT2FPS ===
{{Nasal doc
|syntax = var feet_per_second = knots * KT2FPS;
|text = Converts a velocity from knots to feet per second when multiplied by the velocity in knots. Approximately equal to 1.6878.
}}
=== KT2MPS ===
{{Nasal doc
|syntax = var metres_per_second = knots * KT2MPS;
|text = Converts a velocity from knots to metres per second when multiplied by the velocity in knots. Approximately equal to 0.5144.
}}
=== L2GAL ===
{{Nasal doc
|syntax = var gallons = litres * L2GAL;
|text = Converts a volume from litres to US liquid gallons when multiplied by the volume in litres. Approximately equal to 0.2642.
}}
=== LB2KG ===
{{Nasal doc
|syntax = var kilograms = pounds * LB2KG;
|text = Converts a mass from pounds to kilograms when multiplied by the mass in pounds. Approximately equal to 0.4536.
}}
=== M2FT ===
{{Nasal doc
|syntax = var feet = metres * M2FT;
|text = Converts a length from metres to feet when multiplied by the length in metres. Approximately equal to 3.2808.
}}
=== M2IN ===
{{Nasal doc
|syntax = var inches = metres * M2IN;
|text = Converts a length from metres to inches when multiplied by the length in metres. Approximately equal to 39.3701.
}}
=== M2NM ===
{{Nasal doc
|syntax = var nautical_miles = metres * M2NM;
|text = Converts a length from metres to nautical miles when multiplied by the length in metres. Approximately equal to 0.00054.
}}
=== MPS2KT ===
{{Nasal doc
|syntax = var knots = metres_per_second * MPS2KT;
|text = Converts a velocity from metres per second to knots when multiplied by the velocity in metres per second. Approximately equal to 1.9438.
}}
=== NM2M ===
{{Nasal doc
|syntax = var metres = nautical_miles * NM2M;
|text = Converts a length from nautical miles to metres when multiplied by the length in nautical miles. Equal to 1,852.
}}
=== R2D ===
{{Nasal doc
|syntax = var degrees = radians * R2D;
|text = Converts an angle from radians to degrees when multiplied by the angle in radians. Equal to <code>180 / π</code>.
}}<!--


=== history() (3.1+) ===
=== history() (3.1+) ===
Line 2,232: Line 2,313:
     .always(func print("Request complete (fail or success)"));
     .always(func print("Request complete (fail or success)"));
</syntaxhighlight>
</syntaxhighlight>
-->
-->
{{Appendix}}
{{Appendix}}

Navigation menu