comparison base/src/java/lang/Float.d @ 27:1bf55a6eb092

Renamed java tree to base
author Frank Benoit <benoit@tionex.de>
date Sat, 21 Mar 2009 11:33:57 +0100
parents java/src/java/lang/Float.d@9b96950f2c3c
children fcf926c91ca4
comparison
equal deleted inserted replaced
26:f589fc20a5f9 27:1bf55a6eb092
1 module java.lang.Float;
2
3 import java.lang.util;
4 import java.lang.exceptions;
5
6 class Float : ValueWrapperT!(float) {
7
8 public static float POSITIVE_INFINITY = (1.0f / 0.0f);
9 public static float NEGATIVE_INFINITY = ((-1.0f) / 0.0f);
10 public static float NaN = (0.0f / 0.0f);
11 public static float MAX_VALUE = 3.4028235e+38f;
12 public static float MIN_VALUE = 1.4e-45f;
13 public static int SIZE = 32;
14
15 this( float value ){
16 super(value);
17 }
18 this( String str ){
19 implMissing( __FILE__, __LINE__ );
20 super(0.0);
21 }
22 public float floatValue(){
23 return value;
24 }
25 public static String toString( float value ){
26 implMissing( __FILE__, __LINE__ );
27 return null;
28 }
29 public static float parseFloat( String s ){
30 version(Tango){
31 try{
32 return tango.text.convert.Float.toFloat( s );
33 }
34 catch( IllegalArgumentException e ){
35 throw new NumberFormatException( e );
36 }
37 } else { // Phobos
38 implMissing( __FILE__, __LINE__ );
39 return 0.0f;
40 }
41 }
42
43 }