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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
// SPDX-License-Identifier: AGPL-3.0-or-later
// Copyright (C) 2026 Vallés Puig, Ramon
//! Acceleration unit aliases and named units (`Length / Time²`).
//!
//! This module provides both a **parametric alias** and a **named SI unit** for
//! acceleration:
//!
//! - [`Accel<L, T>`] — a generic alias over [`Per`] that works with any length
//! and time units, mirroring the [`Velocity`](super::velocity::Velocity)
//! pattern.
//! - [`MeterPerSecondSquared`] — the SI coherent unit (m/s²) for contexts
//! where a concrete named type is more convenient.
//!
//! ## Examples
//!
//! ```rust
//! use qtty_core::acceleration::Accel;
//! use qtty_core::length::Meter;
//! use qtty_core::time::Second;
//!
//! let a: Accel<Meter, Second> = Accel::new(9.806_65);
//! assert!((a.value() - 9.806_65).abs() < 1e-12);
//! ```
//!
//! ```rust
//! use qtty_core::acceleration::{MeterPerSecondSquared, MetersPerSecondSquared};
//! use qtty_core::velocity::Velocity;
//! use qtty_core::length::{Meter, Meters};
//! use qtty_core::time::{Second, Seconds};
//!
//! let v = Meters::new(100.0) / Seconds::new(10.0); // Velocity<Meter, Second>
//! let a: MetersPerSecondSquared = MetersPerSecondSquared::new(5.0);
//! assert!((a.value() - 5.0).abs() < 1e-12);
//! ```
use crate::;
use Unit;
/// Re-export the acceleration dimension from the dimension module.
pub use crateAcceleration;
/// Marker trait for any unit whose dimension is [`Acceleration`].
/// An acceleration quantity parameterized by length and time units.
///
/// `Accel<L, T>` represents `L / T²` — the natural result of dividing a
/// velocity by a time quantity, or dividing a length by the square of a time.
///
/// # Examples
///
/// ```rust
/// use qtty_core::acceleration::Accel;
/// use qtty_core::length::{Kilometer, Meter};
/// use qtty_core::time::{Hour, Second};
///
/// let a1: Accel<Meter, Second> = Accel::new(9.8);
/// let a2: Accel<Kilometer, Hour> = a1.to();
/// ```
pub type Accel<L, T> = ;
// ─────────────────────────────────────────────────────────────────────────────
// SI named unit
// ─────────────────────────────────────────────────────────────────────────────
/// Metre per second squared — SI coherent unit of acceleration.
;
/// A quantity measured in metres per second squared.
pub type MetersPerSecondSquared = ;
/// One metre per second squared.
pub const METER_PER_SECOND_SQUARED: MetersPerSecondSquared = new;
/// Standard gravity (g₀ = 9.806 65 m/s², exact by definition).
;
/// A quantity measured in standard gravities.
pub type StandardGravities = ;
/// One standard gravity.
pub const STANDARD_GRAVITY: StandardGravities = new;
// ─────────────────────────────────────────────────────────────────────────────
// Unit inventory macro
// ─────────────────────────────────────────────────────────────────────────────
/// Canonical list of always-available acceleration units.
// Generate bidirectional From impls.
acceleration_units!;
// Cross-unit ops.
acceleration_units!;
// Compile-time check.
acceleration_units!;