Update function comment
This commit is contained in:
@@ -39,11 +39,14 @@ struct LevelTransition {
|
|||||||
state: TransitionState,
|
state: TransitionState,
|
||||||
direction: TransitionDirection,
|
direction: TransitionDirection,
|
||||||
}
|
}
|
||||||
/// Given two level inputs, return one of the following:
|
/// Given two level inputs, return a LevelTransition of the state:
|
||||||
/// - `LevelTransitionState::Bad` if the difference between
|
/// - `TransitionState::Bad` if the difference between
|
||||||
/// the levels is either 0 or great than 3
|
/// the levels is either 0 or great than 3
|
||||||
/// - `LevelTransitionState::Asc` if the value from curr_level to next_level is increasing and it's not BAD
|
/// - otherwise `TransitionState::Good`
|
||||||
/// - `LevelTransitionState::Desc` if the value from curr_level to next_level is decreasing and it's not BAD
|
///
|
||||||
|
/// And direction:
|
||||||
|
/// - `TransitionDirection::Asc` if the value from curr_level to next_level is increasing
|
||||||
|
/// - `TransitionDirection::Desc` if the value from curr_level to next_level is decreasing
|
||||||
fn compare_levels(curr_level: i64, next_level: i64) -> LevelTransition {
|
fn compare_levels(curr_level: i64, next_level: i64) -> LevelTransition {
|
||||||
let level_diff = next_level - curr_level;
|
let level_diff = next_level - curr_level;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user