equal
deleted
inserted
replaced
43 std::cmp::max(self.x.abs(), self.y.abs()) |
43 std::cmp::max(self.x.abs(), self.y.abs()) |
44 } |
44 } |
45 |
45 |
46 #[inline] |
46 #[inline] |
47 pub fn integral_norm(self) -> u32 { |
47 pub fn integral_norm(self) -> u32 { |
48 let sqr = (self.x as u64).pow(2) + (self.y as u64).pow(2); |
48 let sqr = (self.x as u64).wrapping_pow(2) + (self.y as u64).wrapping_pow(2); |
49 integral_sqrt(sqr) as u32 |
49 integral_sqrt(sqr) as u32 |
50 } |
50 } |
51 |
51 |
52 #[inline] |
52 #[inline] |
53 pub const fn transform(self, matrix: &[i32; 4]) -> Self { |
53 pub const fn transform(self, matrix: &[i32; 4]) -> Self { |