Skia
2D Graphics Library
SkV2 Struct Reference

#include <SkM44.h>

Public Member Functions

bool operator== (const SkV2 v) const
 
bool operator!= (const SkV2 v) const
 
SkV2 operator- () const
 
SkV2 operator+ (SkV2 v) const
 
SkV2 operator- (SkV2 v) const
 
SkV2 operator* (SkV2 v) const
 
void operator+= (SkV2 v)
 
void operator-= (SkV2 v)
 
void operator*= (SkV2 v)
 
void operator*= (SkScalar s)
 
void operator/= (SkScalar s)
 
SkScalar lengthSquared () const
 
SkScalar length () const
 
SkScalar dot (SkV2 v) const
 
SkScalar cross (SkV2 v) const
 
SkV2 normalize () const
 
const float * ptr () const
 
float * ptr ()
 

Static Public Member Functions

static SkScalar Dot (SkV2 a, SkV2 b)
 
static SkScalar Cross (SkV2 a, SkV2 b)
 
static SkV2 Normalize (SkV2 v)
 

Public Attributes

float x
 
float y
 

Friends

SkV2 operator* (SkV2 v, SkScalar s)
 
SkV2 operator* (SkScalar s, SkV2 v)
 
SkV2 operator/ (SkV2 v, SkScalar s)
 
SkV2 operator/ (SkScalar s, SkV2 v)
 

Member Function Documentation

◆ Cross()

static SkScalar SkV2::Cross ( SkV2  a,
SkV2  b 
)
inlinestatic

◆ cross()

SkScalar SkV2::cross ( SkV2  v) const
inline

◆ Dot()

static SkScalar SkV2::Dot ( SkV2  a,
SkV2  b 
)
inlinestatic

◆ dot()

SkScalar SkV2::dot ( SkV2  v) const
inline

◆ length()

SkScalar SkV2::length ( ) const
inline

◆ lengthSquared()

SkScalar SkV2::lengthSquared ( ) const
inline

◆ normalize()

SkV2 SkV2::normalize ( ) const
inline

◆ Normalize()

static SkV2 SkV2::Normalize ( SkV2  v)
inlinestatic

◆ operator!=()

bool SkV2::operator!= ( const SkV2  v) const
inline

◆ operator*()

SkV2 SkV2::operator* ( SkV2  v) const
inline

◆ operator*=() [1/2]

void SkV2::operator*= ( SkScalar  s)
inline

◆ operator*=() [2/2]

void SkV2::operator*= ( SkV2  v)
inline

◆ operator+()

SkV2 SkV2::operator+ ( SkV2  v) const
inline

◆ operator+=()

void SkV2::operator+= ( SkV2  v)
inline

◆ operator-() [1/2]

SkV2 SkV2::operator- ( ) const
inline

◆ operator-() [2/2]

SkV2 SkV2::operator- ( SkV2  v) const
inline

◆ operator-=()

void SkV2::operator-= ( SkV2  v)
inline

◆ operator/=()

void SkV2::operator/= ( SkScalar  s)
inline

◆ operator==()

bool SkV2::operator== ( const SkV2  v) const
inline

◆ ptr() [1/2]

float* SkV2::ptr ( )
inline

◆ ptr() [2/2]

const float* SkV2::ptr ( ) const
inline

Friends And Related Function Documentation

◆ operator* [1/2]

SkV2 operator* ( SkScalar  s,
SkV2  v 
)
friend

◆ operator* [2/2]

SkV2 operator* ( SkV2  v,
SkScalar  s 
)
friend

◆ operator/ [1/2]

SkV2 operator/ ( SkScalar  s,
SkV2  v 
)
friend

◆ operator/ [2/2]

SkV2 operator/ ( SkV2  v,
SkScalar  s 
)
friend

Member Data Documentation

◆ x

float SkV2::x

◆ y

float SkV2::y

The documentation for this struct was generated from the following file: