use core::cmp::{Eq, PartialEq};
#[derive(Debug, thiserror::Error, Clone, Copy, PartialEq, Eq)]
pub enum Error {
#[error("Height of the peak cannot be null")]
Height,
#[error("Time to reach the peak cannot be null")]
Time,
#[error("Initial vertical impulse cannot be null")]
Impulse,
#[error("Gravity cannot be null")]
Gravity,
}
#[derive(Debug, thiserror::Error, Clone, Copy, PartialEq, Eq)]
pub enum ErrorTime {
#[error("Time to reach the distance cannot be null")]
Time,
#[error("Distance cannot be null")]
Range,
#[error("Horizontal speed cannot be null")]
Speed,
}
impl From<ErrorTime> for Error {
fn from(_error: ErrorTime) -> Self {
Self::Time
}
}