/** \file
 *  Game Develop
 *  2008-2014 Florian Rival (Florian.Rival@gmail.com)
 */

#ifndef COMMONINSTRUCTIONS_H
#define COMMONINSTRUCTIONS_H
#include <string>

namespace GDpriv
{

namespace CommonInstructions
{

/**
 * Generate a random number between 0 and max
 */
double GD_API Random(int max);

/**
 * Logical negation
 * \return !param
 */
bool GD_API LogicalNegation(bool param);

/**
 * Convert the string to a double.
 * \warning This function is meant to be used only in GD events generated code.
 */
double GD_API ToDouble( const std::string & str );

/**
 * Convert the double to a string.
 * \warning This function is meant to be used only in GD events generated code.
 */
std::string GD_API ToString( double number );

/**
 * Convert the double to a string, disabling scientific notation.
 * \warning This function is meant to be used only in GD events generated code.
 */
std::string GD_API LargeNumberToString( double number );

/**
 * Convert the angle from degrees to radians
 * \warning This function is meant to be used only in GD events generated code.
 */
double GD_API ToRad( double angle );

/**
 * Convert the angle from radians to degrees.
 * \warning This function is meant to be used only in GD events generated code.
 */
double GD_API ToDeg( double angle );

}

}

#endif // COMMONINSTRUCTIONS_H

