Lines Matching refs:rhs
158 pub fn dot(self, rhs: Self) -> i16 { in dot()
159 (self.x * rhs.x) + (self.y * rhs.y) in dot()
165 pub fn dot_into_vec(self, rhs: Self) -> Self { in dot_into_vec()
166 Self::splat(self.dot(rhs)) in dot_into_vec()
174 pub fn min(self, rhs: Self) -> Self { in min()
176 x: self.x.min(rhs.x), in min()
177 y: self.y.min(rhs.y), in min()
186 pub fn max(self, rhs: Self) -> Self { in max()
188 x: self.x.max(rhs.x), in max()
189 y: self.y.max(rhs.y), in max()
250 pub fn cmpeq(self, rhs: Self) -> BVec2 { in cmpeq()
251 BVec2::new(self.x.eq(&rhs.x), self.y.eq(&rhs.y)) in cmpeq()
261 pub fn cmpne(self, rhs: Self) -> BVec2 { in cmpne()
262 BVec2::new(self.x.ne(&rhs.x), self.y.ne(&rhs.y)) in cmpne()
272 pub fn cmpge(self, rhs: Self) -> BVec2 { in cmpge()
273 BVec2::new(self.x.ge(&rhs.x), self.y.ge(&rhs.y)) in cmpge()
283 pub fn cmpgt(self, rhs: Self) -> BVec2 { in cmpgt()
284 BVec2::new(self.x.gt(&rhs.x), self.y.gt(&rhs.y)) in cmpgt()
294 pub fn cmple(self, rhs: Self) -> BVec2 { in cmple()
295 BVec2::new(self.x.le(&rhs.x), self.y.le(&rhs.y)) in cmple()
305 pub fn cmplt(self, rhs: Self) -> BVec2 { in cmplt()
306 BVec2::new(self.x.lt(&rhs.x), self.y.lt(&rhs.y)) in cmplt()
354 pub fn distance_squared(self, rhs: Self) -> i16 { in distance_squared()
355 (self - rhs).length_squared() in distance_squared()
364 pub fn div_euclid(self, rhs: Self) -> Self { in div_euclid()
365 Self::new(self.x.div_euclid(rhs.x), self.y.div_euclid(rhs.y)) in div_euclid()
376 pub fn rem_euclid(self, rhs: Self) -> Self { in rem_euclid()
377 Self::new(self.x.rem_euclid(rhs.x), self.y.rem_euclid(rhs.y)) in rem_euclid()
436 pub fn perp_dot(self, rhs: Self) -> i16 { in perp_dot()
437 (self.x * rhs.y) - (self.y * rhs.x) in perp_dot()
445 pub fn rotate(self, rhs: Self) -> Self { in rotate()
447 x: self.x * rhs.x - self.y * rhs.y, in rotate()
448 y: self.y * rhs.x + self.x * rhs.y, in rotate()
520 pub const fn checked_add(self, rhs: Self) -> Option<Self> { in checked_add()
521 let x = match self.x.checked_add(rhs.x) { in checked_add()
525 let y = match self.y.checked_add(rhs.y) { in checked_add()
538 pub const fn checked_sub(self, rhs: Self) -> Option<Self> { in checked_sub()
539 let x = match self.x.checked_sub(rhs.x) { in checked_sub()
543 let y = match self.y.checked_sub(rhs.y) { in checked_sub()
556 pub const fn checked_mul(self, rhs: Self) -> Option<Self> { in checked_mul()
557 let x = match self.x.checked_mul(rhs.x) { in checked_mul()
561 let y = match self.y.checked_mul(rhs.y) { in checked_mul()
574 pub const fn checked_div(self, rhs: Self) -> Option<Self> { in checked_div()
575 let x = match self.x.checked_div(rhs.x) { in checked_div()
579 let y = match self.y.checked_div(rhs.y) { in checked_div()
592 pub const fn wrapping_add(self, rhs: Self) -> Self { in wrapping_add()
594 x: self.x.wrapping_add(rhs.x), in wrapping_add()
595 y: self.y.wrapping_add(rhs.y), in wrapping_add()
604 pub const fn wrapping_sub(self, rhs: Self) -> Self { in wrapping_sub()
606 x: self.x.wrapping_sub(rhs.x), in wrapping_sub()
607 y: self.y.wrapping_sub(rhs.y), in wrapping_sub()
616 pub const fn wrapping_mul(self, rhs: Self) -> Self { in wrapping_mul()
618 x: self.x.wrapping_mul(rhs.x), in wrapping_mul()
619 y: self.y.wrapping_mul(rhs.y), in wrapping_mul()
628 pub const fn wrapping_div(self, rhs: Self) -> Self { in wrapping_div()
630 x: self.x.wrapping_div(rhs.x), in wrapping_div()
631 y: self.y.wrapping_div(rhs.y), in wrapping_div()
640 pub const fn saturating_add(self, rhs: Self) -> Self { in saturating_add()
642 x: self.x.saturating_add(rhs.x), in saturating_add()
643 y: self.y.saturating_add(rhs.y), in saturating_add()
652 pub const fn saturating_sub(self, rhs: Self) -> Self { in saturating_sub()
654 x: self.x.saturating_sub(rhs.x), in saturating_sub()
655 y: self.y.saturating_sub(rhs.y), in saturating_sub()
664 pub const fn saturating_mul(self, rhs: Self) -> Self { in saturating_mul()
666 x: self.x.saturating_mul(rhs.x), in saturating_mul()
667 y: self.y.saturating_mul(rhs.y), in saturating_mul()
676 pub const fn saturating_div(self, rhs: Self) -> Self { in saturating_div()
678 x: self.x.saturating_div(rhs.x), in saturating_div()
679 y: self.y.saturating_div(rhs.y), in saturating_div()
688 pub const fn checked_add_unsigned(self, rhs: U16Vec2) -> Option<Self> { in checked_add_unsigned()
689 let x = match self.x.checked_add_unsigned(rhs.x) { in checked_add_unsigned()
693 let y = match self.y.checked_add_unsigned(rhs.y) { in checked_add_unsigned()
706 pub const fn checked_sub_unsigned(self, rhs: U16Vec2) -> Option<Self> { in checked_sub_unsigned()
707 let x = match self.x.checked_sub_unsigned(rhs.x) { in checked_sub_unsigned()
711 let y = match self.y.checked_sub_unsigned(rhs.y) { in checked_sub_unsigned()
724 pub const fn wrapping_add_unsigned(self, rhs: U16Vec2) -> Self { in wrapping_add_unsigned()
726 x: self.x.wrapping_add_unsigned(rhs.x), in wrapping_add_unsigned()
727 y: self.y.wrapping_add_unsigned(rhs.y), in wrapping_add_unsigned()
736 pub const fn wrapping_sub_unsigned(self, rhs: U16Vec2) -> Self { in wrapping_sub_unsigned()
738 x: self.x.wrapping_sub_unsigned(rhs.x), in wrapping_sub_unsigned()
739 y: self.y.wrapping_sub_unsigned(rhs.y), in wrapping_sub_unsigned()
748 pub const fn saturating_add_unsigned(self, rhs: U16Vec2) -> Self { in saturating_add_unsigned()
750 x: self.x.saturating_add_unsigned(rhs.x), in saturating_add_unsigned()
751 y: self.y.saturating_add_unsigned(rhs.y), in saturating_add_unsigned()
760 pub const fn saturating_sub_unsigned(self, rhs: U16Vec2) -> Self { in saturating_sub_unsigned()
762 x: self.x.saturating_sub_unsigned(rhs.x), in saturating_sub_unsigned()
763 y: self.y.saturating_sub_unsigned(rhs.y), in saturating_sub_unsigned()
778 fn div(self, rhs: Self) -> Self { in div()
780 x: self.x.div(rhs.x), in div()
781 y: self.y.div(rhs.y), in div()
789 fn div(self, rhs: &I16Vec2) -> I16Vec2 { in div()
790 self.div(*rhs) in div()
797 fn div(self, rhs: &I16Vec2) -> I16Vec2 { in div()
798 (*self).div(*rhs) in div()
805 fn div(self, rhs: I16Vec2) -> I16Vec2 { in div()
806 (*self).div(rhs) in div()
812 fn div_assign(&mut self, rhs: Self) { in div_assign()
813 self.x.div_assign(rhs.x); in div_assign()
814 self.y.div_assign(rhs.y); in div_assign()
820 fn div_assign(&mut self, rhs: &I16Vec2) { in div_assign()
821 self.div_assign(*rhs) in div_assign()
828 fn div(self, rhs: i16) -> Self { in div()
830 x: self.x.div(rhs), in div()
831 y: self.y.div(rhs), in div()
839 fn div(self, rhs: &i16) -> I16Vec2 { in div()
840 self.div(*rhs) in div()
847 fn div(self, rhs: &i16) -> I16Vec2 { in div()
848 (*self).div(*rhs) in div()
855 fn div(self, rhs: i16) -> I16Vec2 { in div()
856 (*self).div(rhs) in div()
862 fn div_assign(&mut self, rhs: i16) { in div_assign()
863 self.x.div_assign(rhs); in div_assign()
864 self.y.div_assign(rhs); in div_assign()
870 fn div_assign(&mut self, rhs: &i16) { in div_assign()
871 self.div_assign(*rhs) in div_assign()
878 fn div(self, rhs: I16Vec2) -> I16Vec2 { in div()
880 x: self.div(rhs.x), in div()
881 y: self.div(rhs.y), in div()
889 fn div(self, rhs: &I16Vec2) -> I16Vec2 { in div()
890 self.div(*rhs) in div()
897 fn div(self, rhs: &I16Vec2) -> I16Vec2 { in div()
898 (*self).div(*rhs) in div()
905 fn div(self, rhs: I16Vec2) -> I16Vec2 { in div()
906 (*self).div(rhs) in div()
913 fn mul(self, rhs: Self) -> Self { in mul()
915 x: self.x.mul(rhs.x), in mul()
916 y: self.y.mul(rhs.y), in mul()
924 fn mul(self, rhs: &I16Vec2) -> I16Vec2 { in mul()
925 self.mul(*rhs) in mul()
932 fn mul(self, rhs: &I16Vec2) -> I16Vec2 { in mul()
933 (*self).mul(*rhs) in mul()
940 fn mul(self, rhs: I16Vec2) -> I16Vec2 { in mul()
941 (*self).mul(rhs) in mul()
947 fn mul_assign(&mut self, rhs: Self) { in mul_assign()
948 self.x.mul_assign(rhs.x); in mul_assign()
949 self.y.mul_assign(rhs.y); in mul_assign()
955 fn mul_assign(&mut self, rhs: &I16Vec2) { in mul_assign()
956 self.mul_assign(*rhs) in mul_assign()
963 fn mul(self, rhs: i16) -> Self { in mul()
965 x: self.x.mul(rhs), in mul()
966 y: self.y.mul(rhs), in mul()
974 fn mul(self, rhs: &i16) -> I16Vec2 { in mul()
975 self.mul(*rhs) in mul()
982 fn mul(self, rhs: &i16) -> I16Vec2 { in mul()
983 (*self).mul(*rhs) in mul()
990 fn mul(self, rhs: i16) -> I16Vec2 { in mul()
991 (*self).mul(rhs) in mul()
997 fn mul_assign(&mut self, rhs: i16) { in mul_assign()
998 self.x.mul_assign(rhs); in mul_assign()
999 self.y.mul_assign(rhs); in mul_assign()
1005 fn mul_assign(&mut self, rhs: &i16) { in mul_assign()
1006 self.mul_assign(*rhs) in mul_assign()
1013 fn mul(self, rhs: I16Vec2) -> I16Vec2 { in mul()
1015 x: self.mul(rhs.x), in mul()
1016 y: self.mul(rhs.y), in mul()
1024 fn mul(self, rhs: &I16Vec2) -> I16Vec2 { in mul()
1025 self.mul(*rhs) in mul()
1032 fn mul(self, rhs: &I16Vec2) -> I16Vec2 { in mul()
1033 (*self).mul(*rhs) in mul()
1040 fn mul(self, rhs: I16Vec2) -> I16Vec2 { in mul()
1041 (*self).mul(rhs) in mul()
1048 fn add(self, rhs: Self) -> Self { in add()
1050 x: self.x.add(rhs.x), in add()
1051 y: self.y.add(rhs.y), in add()
1059 fn add(self, rhs: &I16Vec2) -> I16Vec2 { in add()
1060 self.add(*rhs) in add()
1067 fn add(self, rhs: &I16Vec2) -> I16Vec2 { in add()
1068 (*self).add(*rhs) in add()
1075 fn add(self, rhs: I16Vec2) -> I16Vec2 { in add()
1076 (*self).add(rhs) in add()
1082 fn add_assign(&mut self, rhs: Self) { in add_assign()
1083 self.x.add_assign(rhs.x); in add_assign()
1084 self.y.add_assign(rhs.y); in add_assign()
1090 fn add_assign(&mut self, rhs: &I16Vec2) { in add_assign()
1091 self.add_assign(*rhs) in add_assign()
1098 fn add(self, rhs: i16) -> Self { in add()
1100 x: self.x.add(rhs), in add()
1101 y: self.y.add(rhs), in add()
1109 fn add(self, rhs: &i16) -> I16Vec2 { in add()
1110 self.add(*rhs) in add()
1117 fn add(self, rhs: &i16) -> I16Vec2 { in add()
1118 (*self).add(*rhs) in add()
1125 fn add(self, rhs: i16) -> I16Vec2 { in add()
1126 (*self).add(rhs) in add()
1132 fn add_assign(&mut self, rhs: i16) { in add_assign()
1133 self.x.add_assign(rhs); in add_assign()
1134 self.y.add_assign(rhs); in add_assign()
1140 fn add_assign(&mut self, rhs: &i16) { in add_assign()
1141 self.add_assign(*rhs) in add_assign()
1148 fn add(self, rhs: I16Vec2) -> I16Vec2 { in add()
1150 x: self.add(rhs.x), in add()
1151 y: self.add(rhs.y), in add()
1159 fn add(self, rhs: &I16Vec2) -> I16Vec2 { in add()
1160 self.add(*rhs) in add()
1167 fn add(self, rhs: &I16Vec2) -> I16Vec2 { in add()
1168 (*self).add(*rhs) in add()
1175 fn add(self, rhs: I16Vec2) -> I16Vec2 { in add()
1176 (*self).add(rhs) in add()
1183 fn sub(self, rhs: Self) -> Self { in sub()
1185 x: self.x.sub(rhs.x), in sub()
1186 y: self.y.sub(rhs.y), in sub()
1194 fn sub(self, rhs: &I16Vec2) -> I16Vec2 { in sub()
1195 self.sub(*rhs) in sub()
1202 fn sub(self, rhs: &I16Vec2) -> I16Vec2 { in sub()
1203 (*self).sub(*rhs) in sub()
1210 fn sub(self, rhs: I16Vec2) -> I16Vec2 { in sub()
1211 (*self).sub(rhs) in sub()
1217 fn sub_assign(&mut self, rhs: I16Vec2) { in sub_assign()
1218 self.x.sub_assign(rhs.x); in sub_assign()
1219 self.y.sub_assign(rhs.y); in sub_assign()
1225 fn sub_assign(&mut self, rhs: &I16Vec2) { in sub_assign()
1226 self.sub_assign(*rhs) in sub_assign()
1233 fn sub(self, rhs: i16) -> Self { in sub()
1235 x: self.x.sub(rhs), in sub()
1236 y: self.y.sub(rhs), in sub()
1244 fn sub(self, rhs: &i16) -> I16Vec2 { in sub()
1245 self.sub(*rhs) in sub()
1252 fn sub(self, rhs: &i16) -> I16Vec2 { in sub()
1253 (*self).sub(*rhs) in sub()
1260 fn sub(self, rhs: i16) -> I16Vec2 { in sub()
1261 (*self).sub(rhs) in sub()
1267 fn sub_assign(&mut self, rhs: i16) { in sub_assign()
1268 self.x.sub_assign(rhs); in sub_assign()
1269 self.y.sub_assign(rhs); in sub_assign()
1275 fn sub_assign(&mut self, rhs: &i16) { in sub_assign()
1276 self.sub_assign(*rhs) in sub_assign()
1283 fn sub(self, rhs: I16Vec2) -> I16Vec2 { in sub()
1285 x: self.sub(rhs.x), in sub()
1286 y: self.sub(rhs.y), in sub()
1294 fn sub(self, rhs: &I16Vec2) -> I16Vec2 { in sub()
1295 self.sub(*rhs) in sub()
1302 fn sub(self, rhs: &I16Vec2) -> I16Vec2 { in sub()
1303 (*self).sub(*rhs) in sub()
1310 fn sub(self, rhs: I16Vec2) -> I16Vec2 { in sub()
1311 (*self).sub(rhs) in sub()
1318 fn rem(self, rhs: Self) -> Self { in rem()
1320 x: self.x.rem(rhs.x), in rem()
1321 y: self.y.rem(rhs.y), in rem()
1329 fn rem(self, rhs: &I16Vec2) -> I16Vec2 { in rem()
1330 self.rem(*rhs) in rem()
1337 fn rem(self, rhs: &I16Vec2) -> I16Vec2 { in rem()
1338 (*self).rem(*rhs) in rem()
1345 fn rem(self, rhs: I16Vec2) -> I16Vec2 { in rem()
1346 (*self).rem(rhs) in rem()
1352 fn rem_assign(&mut self, rhs: Self) { in rem_assign()
1353 self.x.rem_assign(rhs.x); in rem_assign()
1354 self.y.rem_assign(rhs.y); in rem_assign()
1360 fn rem_assign(&mut self, rhs: &I16Vec2) { in rem_assign()
1361 self.rem_assign(*rhs) in rem_assign()
1368 fn rem(self, rhs: i16) -> Self { in rem()
1370 x: self.x.rem(rhs), in rem()
1371 y: self.y.rem(rhs), in rem()
1379 fn rem(self, rhs: &i16) -> I16Vec2 { in rem()
1380 self.rem(*rhs) in rem()
1387 fn rem(self, rhs: &i16) -> I16Vec2 { in rem()
1388 (*self).rem(*rhs) in rem()
1395 fn rem(self, rhs: i16) -> I16Vec2 { in rem()
1396 (*self).rem(rhs) in rem()
1402 fn rem_assign(&mut self, rhs: i16) { in rem_assign()
1403 self.x.rem_assign(rhs); in rem_assign()
1404 self.y.rem_assign(rhs); in rem_assign()
1410 fn rem_assign(&mut self, rhs: &i16) { in rem_assign()
1411 self.rem_assign(*rhs) in rem_assign()
1418 fn rem(self, rhs: I16Vec2) -> I16Vec2 { in rem()
1420 x: self.rem(rhs.x), in rem()
1421 y: self.rem(rhs.y), in rem()
1429 fn rem(self, rhs: &I16Vec2) -> I16Vec2 { in rem()
1430 self.rem(*rhs) in rem()
1437 fn rem(self, rhs: &I16Vec2) -> I16Vec2 { in rem()
1438 (*self).rem(*rhs) in rem()
1445 fn rem(self, rhs: I16Vec2) -> I16Vec2 { in rem()
1446 (*self).rem(rhs) in rem()
1539 fn bitand(self, rhs: Self) -> Self::Output { in bitand()
1541 x: self.x.bitand(rhs.x), in bitand()
1542 y: self.y.bitand(rhs.y), in bitand()
1550 fn bitor(self, rhs: Self) -> Self::Output { in bitor()
1552 x: self.x.bitor(rhs.x), in bitor()
1553 y: self.y.bitor(rhs.y), in bitor()
1561 fn bitxor(self, rhs: Self) -> Self::Output { in bitxor()
1563 x: self.x.bitxor(rhs.x), in bitxor()
1564 y: self.y.bitxor(rhs.y), in bitxor()
1572 fn bitand(self, rhs: i16) -> Self::Output { in bitand()
1574 x: self.x.bitand(rhs), in bitand()
1575 y: self.y.bitand(rhs), in bitand()
1583 fn bitor(self, rhs: i16) -> Self::Output { in bitor()
1585 x: self.x.bitor(rhs), in bitor()
1586 y: self.y.bitor(rhs), in bitor()
1594 fn bitxor(self, rhs: i16) -> Self::Output { in bitxor()
1596 x: self.x.bitxor(rhs), in bitxor()
1597 y: self.y.bitxor(rhs), in bitxor()
1605 fn shl(self, rhs: i8) -> Self::Output { in shl()
1607 x: self.x.shl(rhs), in shl()
1608 y: self.y.shl(rhs), in shl()
1616 fn shr(self, rhs: i8) -> Self::Output { in shr()
1618 x: self.x.shr(rhs), in shr()
1619 y: self.y.shr(rhs), in shr()
1627 fn shl(self, rhs: i16) -> Self::Output { in shl()
1629 x: self.x.shl(rhs), in shl()
1630 y: self.y.shl(rhs), in shl()
1638 fn shr(self, rhs: i16) -> Self::Output { in shr()
1640 x: self.x.shr(rhs), in shr()
1641 y: self.y.shr(rhs), in shr()
1649 fn shl(self, rhs: i32) -> Self::Output { in shl()
1651 x: self.x.shl(rhs), in shl()
1652 y: self.y.shl(rhs), in shl()
1660 fn shr(self, rhs: i32) -> Self::Output { in shr()
1662 x: self.x.shr(rhs), in shr()
1663 y: self.y.shr(rhs), in shr()
1671 fn shl(self, rhs: i64) -> Self::Output { in shl()
1673 x: self.x.shl(rhs), in shl()
1674 y: self.y.shl(rhs), in shl()
1682 fn shr(self, rhs: i64) -> Self::Output { in shr()
1684 x: self.x.shr(rhs), in shr()
1685 y: self.y.shr(rhs), in shr()
1693 fn shl(self, rhs: u8) -> Self::Output { in shl()
1695 x: self.x.shl(rhs), in shl()
1696 y: self.y.shl(rhs), in shl()
1704 fn shr(self, rhs: u8) -> Self::Output { in shr()
1706 x: self.x.shr(rhs), in shr()
1707 y: self.y.shr(rhs), in shr()
1715 fn shl(self, rhs: u16) -> Self::Output { in shl()
1717 x: self.x.shl(rhs), in shl()
1718 y: self.y.shl(rhs), in shl()
1726 fn shr(self, rhs: u16) -> Self::Output { in shr()
1728 x: self.x.shr(rhs), in shr()
1729 y: self.y.shr(rhs), in shr()
1737 fn shl(self, rhs: u32) -> Self::Output { in shl()
1739 x: self.x.shl(rhs), in shl()
1740 y: self.y.shl(rhs), in shl()
1748 fn shr(self, rhs: u32) -> Self::Output { in shr()
1750 x: self.x.shr(rhs), in shr()
1751 y: self.y.shr(rhs), in shr()
1759 fn shl(self, rhs: u64) -> Self::Output { in shl()
1761 x: self.x.shl(rhs), in shl()
1762 y: self.y.shl(rhs), in shl()
1770 fn shr(self, rhs: u64) -> Self::Output { in shr()
1772 x: self.x.shr(rhs), in shr()
1773 y: self.y.shr(rhs), in shr()
1781 fn shl(self, rhs: crate::IVec2) -> Self::Output { in shl()
1783 x: self.x.shl(rhs.x), in shl()
1784 y: self.y.shl(rhs.y), in shl()
1792 fn shr(self, rhs: crate::IVec2) -> Self::Output { in shr()
1794 x: self.x.shr(rhs.x), in shr()
1795 y: self.y.shr(rhs.y), in shr()
1803 fn shl(self, rhs: crate::UVec2) -> Self::Output { in shl()
1805 x: self.x.shl(rhs.x), in shl()
1806 y: self.y.shl(rhs.y), in shl()
1814 fn shr(self, rhs: crate::UVec2) -> Self::Output { in shr()
1816 x: self.x.shr(rhs.x), in shr()
1817 y: self.y.shr(rhs.y), in shr()