Ich teile 2 Zahlen und möchte bei Bedarf eine Dezimalzahl zurückgeben. Aber es gibt die ganze Zahl auf allem zurück.Float gibt beim Dezimieren keine Dezimalzahl zurück
float temp = (twoMileInSeconds - 774)/6;
timeIndex = (int)Math.floor(temp);
debug1.setText("Before rounding: " + temp);
debug2.setText("After rounding: " + timeindex);
Dank
twoMileInSeconds ist ein Int. Sollte es schweben? – th3ramr0d
yeah hat twoMileInSeconds in float geändert und zeigt jetzt die korrekte Dezimalzahl an. Vielen Dank! – th3ramr0d
Kann ich einen Ladestock bekommen Daumen hoch? –