Here you can find the source of getMinutes(double t)
double
time value.
Parameter | Description |
---|---|
t | time value in hours. |
int
value of minutes.
public static int getMinutes(double t)
//package com.java2s; //License from project: Open Source License public class Main { /**// w ww . ja v a2 s .com * Returns full number of minutes for given <code>double</code> time value. * @param t time value in hours. * @return <code>int</code> value of minutes. */ public static int getMinutes(double t) { double tt = (t - getHours(t)) * 60; return (int) Math.floor(tt); } /** * Returns full number of hours for given <code>double</code> time value. * @param t time value in hours. * @return <code>int</code> value of hours. */ public static int getHours(double t) { return (int) Math.floor(t); } }