mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Add documentation to Glider data constructor
This commit is contained in:
parent
94b1d37fb7
commit
0f6f7a9096
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user