# synfig::Vector Class Reference

`#include <vector.h>`

List of all members.

## Public Types

typedef Real | value_type

## Public Member Functions

| Vector ()
| Vector (const value_type &x, const value_type &y)
bool | is_valid () const
value_type & | operator[] (const int &i)
const value_type & | operator[] (const int &i) const
const Vector & | operator+= (const Vector &rhs)
const Vector & | operator-= (const Vector &rhs)
const Vector & | operator*= (const value_type &rhs)
const Vector & | operator/= (const value_type &rhs)
Vector | operator+ (const Vector &rhs) const
Vector | operator- (const Vector &rhs) const
Vector | operator* (const value_type &rhs) const
Vector | operator/ (const value_type &rhs) const
Vector | operator- () const
value_type | operator* (const Vector &rhs) const
bool | operator== (const Vector &rhs) const
bool | operator!= (const Vector &rhs) const
value_type | mag_squared () const
| Returns the squared magnitude of the vector.
value_type | mag () const
| Returns the magnitude of the vector.
value_type | inv_mag () const
| Returns the reciprocal of the magnitude of the vector.
Vector | norm () const
| Returns a normalized version of the vector.
Vector | perp () const
| Returns a perpendicular version of the vector.
Angle | angle () const
bool | is_equal_to (const Vector &rhs) const

## Static Public Member Functions

static const Vector | zero ()

## Detailed Description

Todo:
  writeme

## Member Typedef Documentation

typedef Real synfig::Vector::value_type

## Constructor & Destructor Documentation

synfig::Vector::Vector | ( |  | ) | `[inline]`

Referenced by operator*(), operator+(), operator-(), operator/(), perp(), and zero().

synfig::Vector::Vector | ( | const value_type & | x,
|  | const value_type & | y |
| ) |  |  | `[inline]`

## Member Function Documentation

bool synfig::Vector::is_valid | ( |  | ) | const`[inline]`

value_type& synfig::Vector::operator[] | ( | const int & | i | ) | `[inline]`

const value_type& synfig::Vector::operator[] | ( | const int & | i | ) | const`[inline]`

const Vector& synfig::Vector::operator+= | ( | const Vector & | rhs | ) | `[inline]`

References _x, and _y.

const Vector& synfig::Vector::operator-= | ( | const Vector & | rhs | ) | `[inline]`

References _x, and _y.

const Vector& synfig::Vector::operator*= | ( | const value_type & | rhs | ) | `[inline]`

const Vector& synfig::Vector::operator/= | ( | const value_type & | rhs | ) | `[inline]`

Vector synfig::Vector::operator+ | ( | const Vector & | rhs | ) | const`[inline]`

References Vector().

Vector synfig::Vector::operator- | ( | const Vector & | rhs | ) | const`[inline]`

References Vector().

Vector synfig::Vector::operator* | ( | const value_type & | rhs | ) | const`[inline]`

References Vector().

Vector synfig::Vector::operator/ | ( | const value_type & | rhs | ) | const`[inline]`

References Vector().

Vector synfig::Vector::operator- | ( |  | ) | const`[inline]`

References Vector().

value_type synfig::Vector::operator* | ( | const Vector & | rhs | ) | const`[inline]`

References _x, and _y.

bool synfig::Vector::operator== | ( | const Vector & | rhs | ) | const`[inline]`

References _x, and _y.

bool synfig::Vector::operator!= | ( | const Vector & | rhs | ) | const`[inline]`

References _x, and _y.

value_type synfig::Vector::mag_squared | ( |  | ) | const`[inline]`

Returns the squared magnitude of the vector.

Referenced by synfig::BezHull::Bound(), Circle::get_color(), Circle::hit_check(), inv_mag(), synfig::line_point_distsq(), and mag().

value_type synfig::Vector::mag | ( |  | ) | const`[inline]`

Returns the magnitude of the vector.

References mag_squared().

Referenced by std::abs(), synfig::ValueNode_Scale::get_inverse(), Halftone::mask(), synfig::ValueNode_DotProduct::operator()(), synfig::ValueNode_BLineCalcTangent::operator()(), radial_interpolation(), sphtrans(), and Outline::sync().

value_type synfig::Vector::inv_mag | ( |  | ) | const`[inline]`

Returns the reciprocal of the magnitude of the vector.

References mag_squared().

Referenced by InsideOut::get_color(), InsideOut::hit_check(), and norm().

Vector synfig::Vector::norm | ( |  | ) | const`[inline]`

Returns a normalized version of the vector.

References inv_mag().

Referenced by Outline::sync(), and CurveWarp::transform().

Vector synfig::Vector::perp | ( |  | ) | const`[inline]`

Returns a perpendicular version of the vector.

References Vector().

Referenced by synfig::ValueNode_BLine::operator()(), Outline::sync(), and CurveWarp::transform().

Angle synfig::Vector::angle | ( |  | ) | const`[inline]`

Referenced by synfig::ValueNode_BLineCalcTangent::operator()().

bool synfig::Vector::is_equal_to | ( | const Vector & | rhs | ) | const`[inline]`

Referenced by radial_interpolation(), and Outline::sync().

static const Vector synfig::Vector::zero | ( |  | ) | `[inline, static]`

References Vector().

Referenced by synfig::ValueNode_BLine::operator()().

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

- vector.h