Skip to content

Commit

Permalink
Improve doxygen style documentation in header files for plugin develo…
Browse files Browse the repository at this point in the history
…pers (#5254)

* Add doxygen friendly comments to random number generators

* Add doxygen comments explaining binary operators

* Add doxygen comments to unary operator header

* Doxygen comments for contants

* del

* Remove trailing whitespace

* Format with clang-format
  • Loading branch information
madskjeldgaard authored Nov 24, 2020
1 parent d7ef4bd commit 66dbed5
Show file tree
Hide file tree
Showing 4 changed files with 294 additions and 62 deletions.
36 changes: 34 additions & 2 deletions include/plugin_interface/SC_Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,58 @@ const double pi = std::acos(-1.);
const double sc_pi = std::acos(-1.);
# define pi sc_pi // hack to avoid osx warning about deprecated pi
#endif

/// pi / 2
const double pi2 = pi * .5;

/// 3pi / 2
const double pi32 = pi * 1.5;

/// 2pi
const double twopi = pi * 2.;

/// 1/2pi
const double rtwopi = 1. / twopi;

/// log(0.001)
const double log001 = std::log(0.001);

/// log(0.01)
const double log01 = std::log(0.01);

/// log(0.1)
const double log1 = std::log(0.1);

/// 1/log(2)
const double rlog2 = 1. / std::log(2.);

/// sqrt(2)
const double sqrt2 = std::sqrt(2.);

/// 1/sqrt(2)
const double rsqrt2 = 1. / sqrt2;

/// pi as float
const float pi_f = std::acos(-1.f);

/// pi / 2
const float pi2_f = pi_f * 0.5f;

/// 3pi / 2
const float pi32_f = pi_f * 1.5f;

/// 2pi
const float twopi_f = pi_f * 2.f;

/// sqrt(2)
const float sqrt2_f = std::sqrt(2.f);

/// 1/sqrt(2)
const float rsqrt2_f = 1.f / std::sqrt(2.f);

// used to truncate precision
/// used to truncate precision
const float truncFloat = (float)(3. * std::pow(2.0, 22));
const double truncDouble = 3. * std::pow(2.0, 51);

const float kBadValue = 1e20f; // used in the secant table for values very close to 1/0
/// used in the secant table for values very close to 1/0
const float kBadValue = 1e20f;
Loading

0 comments on commit 66dbed5

Please sign in to comment.