()
| 1980 | } |
| 1981 | |
| 1982 | private double getModernUT() { |
| 1983 | |
| 1984 | PlainDate date = this.getDateUTC(); |
| 1985 | double utValue = this.getElapsedTimeUTC(); |
| 1986 | utValue += 42.184; |
| 1987 | utValue += (this.getNanosecond() / (MRD * 1.0)); |
| 1988 | utValue -= TimeScale.deltaT(date); |
| 1989 | long ut = (long) Math.floor(utValue); |
| 1990 | |
| 1991 | if (Double.compare(MRD - (utValue - ut) * MRD, 1.0) < 0) { |
| 1992 | return ut + 1; // prevents rounding errors |
| 1993 | } |
| 1994 | |
| 1995 | return utValue; |
| 1996 | |
| 1997 | } |
| 1998 | |
| 1999 | private static int toNanos( |
| 2000 | double value, |
no test coverage detected