XilinxProcessorIPLib/drivers/sysmonpsu/examples/xsysmonpsu_polled_example.c
int SysMonPsuFractionToInt(float FloatNum)
{
	float Temp;

	Temp = FloatNum;
	if (FloatNum < 0) {
		Temp = -(FloatNum);
	}

	return( ((int)((Temp -(float)((int)Temp)) * (1000.0f))));
}
/****************************************************************************/
/**
*
* This function converts the fraction part of the given floating point number
* (after the decimal point)to an integer.
*
* @param	FloatNum is the floating point number.
*
* @return	Integer number to a precision of 3 digits.
*
* @note
* This function is used in the printing of floating point data to a STDIO device
* using the xil_printf function. The xil_printf is a very small foot-print
* printf function and does not support the printing of floating point numbers.
*
*****************************************************************************/
This function converts the fraction part of the given floating point number
(after the decimal point)to an integer.
This function converts the fraction part of the given floating point number ( after the decimal point ) to an integer .
int SysMonPsuFractionToInt(float FloatNum)
{
	float Temp;
	Temp = FloatNum;
	if (FloatNum < 0) {
		Temp = -(FloatNum);
	}
	return( ((int)((Temp -(float)((int)Temp)) * (1000.0f))));
}
int SysMonPsuFractionToInt ( float FloatNum ) { float Temp ; Temp = FloatNum ; if ( FloatNum < 0 ) { Temp = - ( FloatNum ) ; } return ( ( ( int ) ( ( Temp - ( float ) ( ( int ) Temp ) ) * ( 1000.0f ) ) ) ) ; }
This function converts the fraction part of the given floating point number
(after the decimal point)to an integer.
This function converts the fraction part of the given floating point number ( after the decimal point ) to an integer .