All Classes |Grouped Classes |Index

Class CL_Vec2

2D vector More...

Derived from:

None

Derived by:

CL_Pointx< T &g >

Group:

Math (Core)

#include <ClanLib/core.h>

Class Members:

Attributes:

length

Returns the length (magnitude) of this vector.

normalize

Normalizes this vector.

dot

Dot products this vector with an other vector.

angle

Calculate the angle between this vector and an other vector.

angle_relative

Calculate the angle between this vector relative to another vector.

distance

Calculate the distance between this vector and an other vector.

round

Rounds all components of this vector.

rotate

Rotate this vector around another point.

round_value

Rounds a value for the datatype.


Operators:

operator[]

operator Type *

operator Type *const

operator+=

+= operator.

operator+

operator-=

-= operator.

operator-

operator*=

*= operator.

operator*

operator/=

/= operator.

operator/

/ operator.

operator==

== operator.

operator!=

!= operator.

CL_Vec2

calc_origin

Returns the anchor point for the origin within the dimensions of the size structure.

dot

Dot products a vector with an other vector.

normalize

Normalizes a vector.

rotate

Rotate a vector around another point.

round

Rounds all components on a vector.

Detailed description:

These vector templates are defined for:char (CL_Vec2c), unsigned char (CL_Vec2uc), short (CL_Vec2s),unsigned short (CL_Vec2us), int (CL_Vec2i), unsigned int (CL_Vec2ui), float (CL_Vec2f), double (CL_Vec2d)