Isomet Modular Synthesiser (iMS) API  v1.4.2
iMS API
Public Member Functions | Static Public Member Functions | List of all members
iMS::Degrees Class Reference

Type Definition for all operations that require an angle specification in degrees. More...

#include <include/IMSTypeDefs.h>

Public Member Functions

 Degrees (double arg)
 Construct a Degrees object from a double argument and check its value is within the range 0.0 <= arg < 360.0. If not, the object is still constructed, but the value is wrapped around to fit within the range. More...
 
Degreesoperator= (double arg)
 Assignment of a double argument in degrees to an existing Degrees object. More...
 
 operator double () const
 Return a double representing the Degrees object's value. More...
 

Static Public Member Functions

static unsigned int RenderAsImagePoint (const IMSSystem &, const Degrees)
 Used internally by the library to convert a Degrees object into a hardware-dependent integer representation used by the Image for RF Output phase. More...
 
static unsigned int RenderAsCompensationPoint (const IMSSystem &, const Degrees)
 Used internally by the library to convert a Degrees object into a hardware-dependent integer representation used by the Compensation Table for channel phase increment. More...
 
static unsigned int RenderAsCalibrationTone (const IMSSystem &, const Degrees)
 Used internally by the library to convert a Degrees object into a hardware-dependent integer representation used by the Calibration Tone for channel phase increment. More...
 

Detailed Description

Type Definition for all operations that require an angle specification in degrees.

Internally, the Degrees value is stored as a double precision variable and is limited to sit within the range 0.0 <= Percent < 360.0.

Author
Dave Cowan
Date
2015-11-03
Since
1.0

Constructor & Destructor Documentation

iMS::Degrees::Degrees ( double  arg)
inline

Construct a Degrees object from a double argument and check its value is within the range 0.0 <= arg < 360.0. If not, the object is still constructed, but the value is wrapped around to fit within the range.

Parameters
[in]argThe percentage value
Since
1.0

Member Function Documentation

iMS::Degrees::operator double ( ) const
inline

Return a double representing the Degrees object's value.

Since
1.0
Degrees& iMS::Degrees::operator= ( double  arg)
inline

Assignment of a double argument in degrees to an existing Degrees object.

The double argument of the assigner must be within the range 0.0 <= arg < 360.0 else it will be wrapped around to fit within the range.

// needed for PI
#define _USE_MATH_DEFINES
#include <iostream>
#include <cmath>
Degrees phase = atan2(1.0, -1.0) * (360.0 / 2 * M_PI);
std::cout << "The arctangent for [x=-1, y=1] is " << phase << " degrees" << std::endl;

prints:

The arctangent for [x=-1, y=1] is 135.000000 degrees
Since
1.0
static unsigned int iMS::Degrees::RenderAsCalibrationTone ( const IMSSystem ,
const Degrees   
)
static

Used internally by the library to convert a Degrees object into a hardware-dependent integer representation used by the Calibration Tone for channel phase increment.

Not intended for use in application code

Since
1.1.0
static unsigned int iMS::Degrees::RenderAsCompensationPoint ( const IMSSystem ,
const Degrees   
)
static

Used internally by the library to convert a Degrees object into a hardware-dependent integer representation used by the Compensation Table for channel phase increment.

Not intended for use in application code

static unsigned int iMS::Degrees::RenderAsImagePoint ( const IMSSystem ,
const Degrees   
)
static

Used internally by the library to convert a Degrees object into a hardware-dependent integer representation used by the Image for RF Output phase.

Not intended for use in application code


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