Changeset f1fb54b9f7 in tspsg for src/globals.h


Ignore:
Timestamp:
Jan 7, 2010, 2:24:18 AM (14 years ago)
Author:
Oleksii Serdiuk
Branches:
0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
Children:
946f442ab0
Parents:
4ccf855df8
Message:

+ Added the ability to generate fractional random numbers.
+ Added "Scroll to the end of solution output after solving" option.

  • Set the accuracy for fractional numbers on output to 2 decimail places.
  • Updated translations to reflect changes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/globals.h

    r4ccf855df8 rf1fb54b9f7  
    4646//! Default number of cities
    4747#define DEF_NUM_CITIES 5
     48//! Default value for generating fractional random values
     49#define DEF_FRACTIONAL_RANDOM false
    4850//! Default value for showing or not solution step matrices
    4951#define DEF_SHOW_MATRIX true
     
    5254//! Default maximum number of cities to show solution step matrices
    5355#define DEF_SHOW_MATRIX_CITY_LIMIT 15
     56//! Default for scrolling to the end of output after solving
     57#define DEF_SCROLL_TO_END true
    5458//! Default font name
    5559#define DEF_FONT_FAMILY "Courier New"
     
    108112#define INFSTR "---"
    109113
     114// FUNCTIONS
     115/*!
     116 * \brief Checks whether \a x contains an integer value
     117 * \param x A value to check
     118 * \return \c true if \a x countains an integer, oherwise \c false
     119 */
     120inline bool isInteger(double x)
     121{
     122double i;
     123        return (modf(x, &i) == 0.0);
     124}
     125
    110126// Sanity checks
    111127// Check that default number of cities is sane (<= MAX_NUM_CITIES)
Note: See TracChangeset for help on using the changeset viewer.