summaryrefslogtreecommitdiff
path: root/jnyqide/Pair.java
diff options
context:
space:
mode:
Diffstat (limited to 'jnyqide/Pair.java')
-rw-r--r--jnyqide/Pair.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/jnyqide/Pair.java b/jnyqide/Pair.java
new file mode 100644
index 0000000..ca1caa9
--- /dev/null
+++ b/jnyqide/Pair.java
@@ -0,0 +1,38 @@
+package jnyqide;
+
+import java.io.*;
+import java.util.*;
+
+public class Pair
+{
+ private double time, value;
+
+ public Pair(){
+ time = 0;
+ value = 0;
+ }
+
+ public Pair(double t, double v){
+
+ if (t < 0) {
+ System.out.println("Warning: negative time scale input.");
+ }
+
+ // plotted functions are not signals, so you shouldn't expect them to stay within [-1, 1]
+ //if (v < -1 || v > 1){
+ // System.out.println("Warning: Value is out of bounds.");
+ //}
+
+ time = t;
+ value = v;
+ }
+
+ public double getTime(){
+ return time;
+ }
+
+ public double getValue(){
+ return value;
+ }
+
+} \ No newline at end of file