La virgule(décimale)
Fermé
@dilife
Messages postés
3
Date d'inscription
jeudi 16 juin 2016
Statut
Membre
Dernière intervention
23 juillet 2017
-
16 juin 2016 à 03:07
KX Messages postés 16668 Date d'inscription samedi 31 mai 2008 Statut Modérateur Dernière intervention 17 mars 2023 - 16 juin 2016 à 07:19
KX Messages postés 16668 Date d'inscription samedi 31 mai 2008 Statut Modérateur Dernière intervention 17 mars 2023 - 16 juin 2016 à 07:19
1 réponse
KX
Messages postés
16668
Date d'inscription
samedi 31 mai 2008
Statut
Modérateur
Dernière intervention
17 mars 2023
3 005
16 juin 2016 à 07:19
16 juin 2016 à 07:19
Bonjour,
Il va sûrement te falloir un booléen pour indiquer si tu as déjà appuyé sur la virgule ou pas.
Il va sûrement te falloir un booléen pour indiquer si tu as déjà appuyé sur la virgule ou pas.
private boolean hasFractionalPart = false;
public void pushRadixPoint() {
if (hasFractionalPart)
return; // already setted
// display radix point
hasFractionalPart = true;
}
private void pushClear() {
hasFractionalPart = false;
}