Mercurial > projects > dwt-linux
changeset 228:a8304c57f9d8
sync with dwt-win
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 11 Apr 2008 23:21:55 +0200 |
parents | 4e6393f43231 |
children | d02819f051cc |
files | dwt/dwthelper/utils.d |
diffstat | 1 files changed, 18 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dwt/dwthelper/utils.d Fri Apr 11 23:19:11 2008 +0200 +++ b/dwt/dwthelper/utils.d Fri Apr 11 23:21:55 2008 +0200 @@ -257,6 +257,14 @@ } class Float : ValueWrapperT!(float) { + + public static float POSITIVE_INFINITY = (1.0f / 0.0f); + public static float NEGATIVE_INFINITY = ((-1.0f) / 0.0f); + public static float NaN = (0.0f / 0.0f); + public static float MAX_VALUE = 3.4028235e+38f; + public static float MIN_VALUE = 1.4e-45f; + public static int SIZE = 32; + this( float value ){ super(value); } @@ -271,6 +279,15 @@ implMissing( __FILE__, __LINE__ ); return null; } + public static float parseFloat( char[] s ){ + try{ + return tango.text.convert.Float.toFloat( s ); + } + catch( IllegalArgumentException e ){ + throw new NumberFormatException( e ); + } + } + } class Long : ValueWrapperT!(long) { this( long value ){ @@ -751,7 +768,7 @@ private extern(C) GCStats gc_stats(); size_t RuntimeTotalMemory(){ - GCStats s;// = gc_stats(); + GCStats s = gc_stats(); return s.poolsize; }