use std::ops;
use super::Vec2u32;
impl ops::Add<Self> for Vec2u32 {
type Output = Self;
fn add(self, rhs: Self) -> Self {
Self{
x: self.x + rhs.x,
y: self.y + rhs.y
}
}
}
impl ops::Add<u32> for Vec2u32 {
type Output = Self;
fn add(self, rhs: u32) -> Self {
Self{
x: self.x + rhs,
y: self.y + rhs
}
}
}
impl ops::AddAssign<Self> for Vec2u32 {
fn add_assign(&mut self, rhs: Self){
*self = Self{
x: self.x + rhs.x,
y: self.y + rhs.y
}
}
}
impl ops::AddAssign<u32> for Vec2u32 {
fn add_assign(&mut self, rhs: u32){
*self = Self{
x: self.x + rhs,
y: self.y + rhs
}
}
}
impl ops::Div<Self> for Vec2u32 {
type Output = Self;
fn div(self, rhs: Self) -> Self {
Self{
x: self.x / rhs.x,
y: self.y / rhs.y
}
}
}
impl ops::Div<u32> for Vec2u32 {
type Output = Self;
fn div(self, rhs: u32) -> Self {
Self{
x: self.x / rhs,
y: self.y / rhs
}
}
}
impl ops::DivAssign<Self> for Vec2u32 {
fn div_assign(&mut self, rhs: Self){
*self = Self{
x: self.x / rhs.x,
y: self.y / rhs.y
}
}
}
impl ops::DivAssign<u32> for Vec2u32 {
fn div_assign(&mut self, rhs: u32){
*self = Self{
x: self.x / rhs,
y: self.y / rhs
}
}
}
impl ops::Rem<Self> for Vec2u32 {
type Output = Self;
fn rem(self, rhs: Self) -> Self {
Self{
x: self.x % rhs.x,
y: self.y % rhs.y
}
}
}
impl ops::Rem<u32> for Vec2u32 {
type Output = Self;
fn rem(self, rhs: u32) -> Self {
Self{
x: self.x % rhs,
y: self.y % rhs
}
}
}
impl ops::RemAssign<Self> for Vec2u32 {
fn rem_assign(&mut self, rhs: Self) {
*self = Self{
x: self.x % rhs.x,
y: self.y % rhs.y
}
}
}
impl ops::RemAssign<u32> for Vec2u32 {
fn rem_assign(&mut self, rhs: u32) {
*self = Self{
x: self.x % rhs,
y: self.y % rhs
}
}
}
impl ops::Sub<Self> for Vec2u32 {
type Output = Self;
fn sub(self, rhs: Self) -> Self {
Self{
x: self.x - rhs.x,
y: self.y - rhs.y
}
}
}
impl ops::Sub<u32> for Vec2u32 {
type Output = Self;
fn sub(self, rhs: u32) -> Self {
Self{
x: self.x - rhs,
y: self.y - rhs
}
}
}
impl ops::SubAssign<Self> for Vec2u32 {
fn sub_assign(&mut self, rhs: Self) {
*self = Self{
x: self.x - rhs.x,
y: self.y - rhs.y
}
}
}
impl ops::SubAssign<u32> for Vec2u32 {
fn sub_assign(&mut self, rhs: u32) {
*self = Self{
x: self.x - rhs,
y: self.y - rhs
}
}
}