From 0f6f7a9096843a32e08d3f870cb84c77076687e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludvig=20B=C3=B6klin?= Date: Sat, 24 Apr 2021 21:31:53 +0200 Subject: [PATCH] Add documentation to Glider data constructor --- common/src/states/glide.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/src/states/glide.rs b/common/src/states/glide.rs index d0750a7ccb..06d9dc23ea 100644 --- a/common/src/states/glide.rs +++ b/common/src/states/glide.rs @@ -17,6 +17,12 @@ pub struct Data { } impl Data { + /// A glider is modelled as an elliptical wing and has a span length + /// (distance from wing tip to wing tip) and a chord length (distance from + /// leading edge to trailing edge through its centre) measured in block + /// units. + /// + /// https://en.wikipedia.org/wiki/Elliptical_wing pub fn new(span_length: f32, chord_length: f32, ori: Ori) -> Self { let planform_area = std::f32::consts::PI * chord_length * span_length * 0.25; Self {