Struct msdfgen_sys::msdfgen_Vector2
source · Expand description
A 2-dimensional euclidean vector with double precision. Implementation based on the Vector2 template from Artery Engine. @author Viktor Chlumsky
Fields§
§x: f64
§y: f64
Implementations§
source§impl msdfgen_Vector2
impl msdfgen_Vector2
pub unsafe fn reset(&mut self)
pub unsafe fn set(&mut self, x: f64, y: f64)
pub unsafe fn length(&self) -> f64
pub unsafe fn direction(&self) -> f64
pub unsafe fn normalize(&self, allowZero: bool) -> msdfgen_Vector2
pub unsafe fn getOrthogonal(&self, polarity: bool) -> msdfgen_Vector2
pub unsafe fn getOrthonormal(
&self,
polarity: bool,
allowZero: bool
) -> msdfgen_Vector2
pub unsafe fn project(
&self,
vector: *const msdfgen_Vector2,
positive: bool
) -> msdfgen_Vector2
pub unsafe fn new(val: f64) -> Self
pub unsafe fn new1(x: f64, y: f64) -> Self
Trait Implementations§
source§impl Clone for msdfgen_Vector2
impl Clone for msdfgen_Vector2
source§fn clone(&self) -> msdfgen_Vector2
fn clone(&self) -> msdfgen_Vector2
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more