Skip to content
Snippets Groups Projects
Commit bd015d1a authored by DALI AYOUB's avatar DALI AYOUB :speech_balloon:
Browse files

Upload New File

parent fd8ece31
Branches
No related merge requests found
public class SexDec {
private double dec;
public SexDec(double heureDec) {
this.dec = heureDec;
}
public double getDec() {
return dec;
}
public SexDec(int heure, int mn, int sec) {
this.dec = heure + (mn + sec / 60.0) / 60.0;
}
public int getH() {
int heure = (int) dec;
return heure;
}
public int getM() {
int heure = getH();
int mn = (int) ((dec - heure) * 60);
return mn;
}
public int getS() {
int heure = getH();
int mn = getM();
int sec = (int) ((dec - heure - mn / 60.0) * 3600);
return sec;
}
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment