pub fn center_position(&self, mut position: DVec2, size: DVec2, center: bool) -> DVec2 {
		if center && self.right {
			position.x -= size.x / 2.;
		}
		if center && self.bottom {
			position.y -= size.y / 2.;
		}

		position
	}
/// Moves the position to account for centring (only necessary with absolute transforms - e.g. with artboards)
Moves the position to account for centring (only necessary with absolute transforms - e.g. with artboards)
Moves the position to account for centring ( only necessary with absolute transforms - e . g . with artboards )
pub fn center_position(&self, mut position: DVec2, size: DVec2, center: bool) -> DVec2 {
		if center && self.right {
			position.x -= size.x / 2.;
		}
		if center && self.bottom {
			position.y -= size.y / 2.;
		}
		position
	}
pub fn center_position ( & self , mut position : DVec2 , size : DVec2 , center : bool ) -> DVec2 { if center && self . right { position . x -= size . x / 2. ; } if center && self . bottom { position . y -= size . y / 2. ; } position }
Moves the position to account for centring (only necessary with absolute transforms - e.g.
Moves the position to account for centring ( only necessary with absolute transforms - e . g .
&self
position
DVec2
size
DVec2
center
bool
&self
position
DVec2
size
DVec2
center
bool