feat(core): minor additions to the API
This commit is contained in:
parent
c666498ac0
commit
e22410eea8
3 changed files with 19 additions and 4 deletions
|
|
@ -24,7 +24,7 @@ pub use cast::*;
|
|||
pub use cmp_ops::*;
|
||||
use itertools::Itertools;
|
||||
pub use num_ops::*;
|
||||
use num_traits::NumCast;
|
||||
use num_traits::{Num, NumCast};
|
||||
pub use traits::*;
|
||||
use utils::intersect_bounds;
|
||||
|
||||
|
|
@ -396,6 +396,16 @@ impl<T> Signal<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: Num> Signal<T> {
|
||||
pub fn zero() -> Self {
|
||||
Signal::constant(T::zero())
|
||||
}
|
||||
|
||||
pub fn one() -> Self {
|
||||
Signal::constant(T::one())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(test, feature = "arbitrary"))]
|
||||
pub mod arbitrary {
|
||||
use proptest::prelude::*;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue