1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// fisica::units::area
//
//!
//
#[allow(unused_imports)]
use crate::units::Length;
use crate::Magnitude;
/// `Area`, in `m²` (squared [`Length`]).
///
/// The quantity that expresses the extent of a two-dimensional region, shape,
/// or planar lamina, in the plane.
///
/// External links:
/// - <https://en.wikipedia.org/wiki/Area>
/// - <https://en.wikipedia.org/wiki/Orders_of_magnitude_(area)>
#[derive(Clone, Copy, Debug)]
pub struct Area {
pub m: Magnitude,
}
impl Area {
/// new Area
#[inline]
pub const fn new(m: Magnitude) -> Self {
Self { m }
}
/// Returns the magnitude.
#[inline]
pub const fn m(&self) -> Magnitude {
self.m
}
}
impl_scalar_methods_square![
Area,
qa = m2,
QaL = square_,
QaM = metres,
qu = "m²",
QuL = "square",
QuM = "metres"
];