scummvm/tools/int2flt.cpp

35 lines
1.1 KiB
C++
Raw Normal View History

2009-05-26 14:04:08 +00:00
/* Residual - A 3D game interpreter
2008-06-15 13:00:53 +00:00
*
* Residual is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the AUTHORS
* file distributed with this source distribution.
2006-04-02 14:20:45 +00:00
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*
* $URL$
* $Id$
*
*/
2003-08-17 11:07:56 +00:00
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
2008-06-15 12:56:19 +00:00
unsigned i = atoi(argv[1]);
float *f = (float *)&i;
printf("%g\n", *f);
return 0;
2003-08-17 11:07:56 +00:00
}