Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this compliant solution, pi is declared as a const-qualified object, allowing the constant to have scope.

Code Block
bgColor#ccccff
float const pi = 3.14159;
float degrees;
float radians;
/* ... */
radians = degrees * pi / 180;

This While inadequate in some ways, this is the best solution that can be done for non-integer constants.

...