aboutsummaryrefslogtreecommitdiffstats
path: root/src/ru/olamedia/astronomy/NewMoonChecker.java
diff options
context:
space:
mode:
authorolamedia <[email protected]>2012-10-02 15:27:32 +0600
committerolamedia <[email protected]>2012-10-02 15:27:32 +0600
commit1c148c52797038ad65854edea41b9979ff6281c1 (patch)
tree51653b329c3c0e94c870f897c17d73d8f2fa596f /src/ru/olamedia/astronomy/NewMoonChecker.java
parentcc9219581920a5143e89493019cf0941912d01da (diff)
night
Diffstat (limited to 'src/ru/olamedia/astronomy/NewMoonChecker.java')
-rw-r--r--src/ru/olamedia/astronomy/NewMoonChecker.java41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/ru/olamedia/astronomy/NewMoonChecker.java b/src/ru/olamedia/astronomy/NewMoonChecker.java
new file mode 100644
index 0000000..d8472fd
--- /dev/null
+++ b/src/ru/olamedia/astronomy/NewMoonChecker.java
@@ -0,0 +1,41 @@
+package ru.olamedia.astronomy;
+
+/*
+ * Copyright 2011 Brad Parks
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//package com.bradsbrain.simpleastronomy;
+
+public class NewMoonChecker extends MoonChecker {
+
+ private static final double VERY_SMALL_ANGLE = 0.01;
+ private static final double VERY_SMALL_PERCENT = 0.01;
+
+ /**
+ * A new moon would be at a very small angle
+ */
+ @Override
+ public boolean isCorrectAngle(double d) {
+ return d < VERY_SMALL_ANGLE;
+ }
+
+ /**
+ * A new moon would be at a very small percent visible
+ */
+ @Override
+ public boolean isCorrectPercent(double d) {
+ return d < VERY_SMALL_PERCENT;
+ }
+
+}