lighthouse_protocol/utils/
sqrt.rs1pub trait Sqrt {
3 fn sqrt(self) -> Self;
5}
6
7macro_rules! impl_sqrt {
8 ($($tys:ty),*) => {
9 $(impl Sqrt for $tys {
10 fn sqrt(self) -> Self {
11 <$tys>::sqrt(self)
12 }
13 })*
14 };
15}
16
17impl_sqrt!(
18 f32, f64
19);