private void set ( final int i , double f ) { integer = i ; int fi = ( int ) f ; f -= fi ; integer += fi ; if ( f < 0 ) { f += 1 ; integer -- ; } this . fraction = f ; }
Sets integer and fractional part with normalization . Normalization means that if double is out of range values will be correctly fixed .