1use crate::*;
2use std::ops::*;
3
4impl HasValue for isize {
7 type Output = Self;
8
9 fn value(self) -> Self::Output {
10 self
11 }
12}
13
14impl Number for isize {
17 const ZERO: Self = 0;
18 const ONE: Self = 1;
19 const EPSILON: Self = 0;
20
21 fn abs(self) -> Self {
22 self.abs()
23 }
24
25 fn min(self, other: Self) -> Self {
26 Ord::min(self, other)
27 }
28
29 fn max(self, other: Self) -> Self {
30 Ord::max(self, other)
31 }
32
33 fn floor(self) -> Self {
34 self
35 }
36
37 fn round(self) -> Self {
38 self
39 }
40
41 fn ceil(self) -> Self {
42 self
43 }
44
45 fn trunc(self) -> Self {
46 self
47 }
48}
49
50impl Scalar for isize {}
53
54impl Pow2 for isize {
57 type Output = Self;
58
59 fn pow2(&self) -> <Self as Pow2>::Output {
60 self.pow(2)
61 }
62}
63
64impl Pow3 for isize {
65 type Output = Self;
66
67 fn pow3(&self) -> <Self as Pow3>::Output {
68 self.pow(3)
69 }
70}
71
72impl<LE, ME, TE, IE, OE> Mul<Qt<isize, LE, ME, TE, IE, OE>> for isize
75where
76 LE: ScaleFactor,
77 ME: ScaleFactor,
78 TE: ScaleFactor,
79 IE: ScaleFactor,
80 OE: ScaleFactor,
81{
82 type Output = Qt<isize, LE, ME, TE, IE, OE>;
83 fn mul(self, other: Qt<isize, LE, ME, TE, IE, OE>) -> Self::Output {
84 Self::Output::new(self * other.value())
85 }
86}