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
// devela::num::quant::cycle
//
//! Defines [`Cycle`], [`CycleCount`].
//
use crateConstInit;
/// A repeating cycle defined by a fundamental period.
///
/// A `Cycle` encapsulates the basic unit over which any phenomenon repeats,
/// whether in time, space, or any abstract domain. It is the foundation for
/// constructing more complex periodic behaviors.
/// A cycle that repeats a fixed number of times.
///
/// `CycleCount` couples a fundamental `Cycle` with a discrete repetition count.
///
/// This is useful when the number of repetitions is significant.
/// For example, when an animation should loop a specified number of times.
// WIPZONE
// #[doc = crate::_tags!(quant)]
// /// Cyclic behavior.
// ///
// /// Defines operations common to periodic structures, such as retrieving
// /// the period, normalizing values within the cycle, applying offsets,
// /// and handling bounded or repeated cycles.
// pub trait Cycled<T> {
// /// Returns the fundamental period of the cycle.
// fn cycle_period(&self) -> T;
//
// /// Normalizes a value within the cycle's periodic range.
// ///
// /// Ensures that the input `value` is wrapped within `[0, period)`.
// fn cycle_normalize(&self, value: T) -> T;
//
// ///
// fn cycle_count(&self) -> T;
//
// ///
// fn cycle_offset(&self) -> T;
//
// /// Advances the cycle by a given offset.
// ///
// /// This may modify internal state or return a new cycle with the offset applied.
// fn with_offset(&self, offset: T) -> Self;
//
// /// Determines how many complete cycles fit within a given range.
// ///
// /// This method is useful for bounded or counted cycles.
// fn cycles_in_range(&self, range: T) -> T;
// }