fn offset_pivot(&self, center: bool, size: DVec2) -> DVec2 {
		let mut offset = DVec2::ZERO;

		if center && self.right {
			offset.x -= size.x / 2.;
		}
		if center && self.left {
			offset.x += size.x / 2.;
		}
		if center && self.bottom {
			offset.y -= size.y / 2.;
		}
		if center && self.top {
			offset.y += size.y / 2.;
		}
		offset
	}
/// Offsets the transformation pivot in order to scale from the center
Offsets the transformation pivot in order to scale from the center
Offsets the transformation pivot in order to scale from the center
fn offset_pivot(&self, center: bool, size: DVec2) -> DVec2 {
		let mut offset = DVec2::ZERO;
		if center && self.right {
			offset.x -= size.x / 2.;
		}
		if center && self.left {
			offset.x += size.x / 2.;
		}
		if center && self.bottom {
			offset.y -= size.y / 2.;
		}
		if center && self.top {
			offset.y += size.y / 2.;
		}
		offset
	}
fn offset_pivot ( & self , center : bool , size : DVec2 ) -> DVec2 { let mut offset = DVec2 :: ZERO ; if center && self . right { offset . x -= size . x / 2. ; } if center && self . left { offset . x += size . x / 2. ; } if center && self . bottom { offset . y -= size . y / 2. ; } if center && self . top { offset . y += size . y / 2. ; } offset }
Offsets the transformation pivot in order to scale from the center
Offsets the transformation pivot in order to scale from the center
&self
center
bool
size
DVec2
&self
center
bool
size
DVec2