amino  1.0-beta2
Lightweight Robot Utility Library
amino::Vec2 Struct Reference

A 2D vector represented using a complex number. More...

#include <planar.hpp>

Inheritance diagram for amino::Vec2:
amino::BaseCmplx

Public Member Functions

 Vec2 ()
 Construct a zero vector.
 
 Vec2 (double x, double y)
 Construct from x and y components.
 
 Vec2 (aa_tf_vec2 v)
 Construct from a C complex number.
 
double x () const
 Return value of the x component.
 
double y () const
 Return value of the y component.
 
double & x ()
 Return assignable reference to the x component.
 
double & y ()
 Return assignable reference to the y component.
 
- Public Member Functions inherited from amino::BaseCmplx
 BaseCmplx ()
 Construct a zero-valued complex number.
 
 BaseCmplx (double real, double imag)
 Construct from real and imaginary values.
 
 BaseCmplx (type c)
 Construct from a C++ complex number.
 
 BaseCmplx (const aa_tf_cmplx &v)
 Construct from a C complex number.
 
aa_tf_cmplx c_cmplx () const
 Convert to a C complex number.
 
 operator aa_tf_cmplx () const
 Implicit conversion to a C complex number.
 

Additional Inherited Members

- Public Types inherited from amino::BaseCmplx
typedef ::std::complex< double > type
 Convenience typedef for C++ complex numbers.
 
- Static Public Member Functions inherited from amino::BaseCmplx
static aa_tf_cmplx c_cmplx (type c)
 Convert to a C complex number.
 
static double c_real (const aa_tf_cmplx &v)
 Extract real part of a C complex number.
 
static double c_imag (const aa_tf_cmplx &v)
 Extract imaginary part of a C complex number.
 
static type from (const aa_tf_cmplx &v)
 Convert C complex number to C++ complex number.
 
- Protected Member Functions inherited from amino::BaseCmplx
double & real_ref ()
 Assignable reference to the real part.
 
double & imag_ref ()
 Assignable reference to the imaginary part.
 

Detailed Description

A 2D vector represented using a complex number.

Definition at line 113 of file planar.hpp.


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