Skip to content
This repository was archived by the owner on Sep 15, 2023. It is now read-only.

Commit 6cfa6f6

Browse files
committed
Add docs to misc classes
1 parent bac7efd commit 6cfa6f6

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

src/main/java/com/kylecorry/frc/vision/Range.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,53 @@
11
package com.kylecorry.frc.vision;
22

3+
/**
4+
* A class which represents a numerical range.
5+
*/
36
public class Range {
47

58
private double low;
69
private double high;
710

11+
/**
12+
* Creates a numerical range.
13+
* @param low The minimum value in the range.
14+
* @param high The maximum value in the range.
15+
*/
816
public Range(double low, double high) {
917
this.low = low;
1018
this.high = high;
1119
}
1220

21+
/**
22+
* Gets the lowest value of the range.
23+
* @return The lowest value.
24+
*/
1325
public double getLow() {
1426
return low;
1527
}
1628

29+
/**
30+
* Gets the highest value of the range.
31+
* @return The highest value.
32+
*/
1733
public double getHigh() {
1834
return high;
1935
}
2036

37+
/**
38+
* Determines whether a value is in the range (inclusive).
39+
* @param value The value to check for.
40+
* @return True if the value is in the inclusive range.
41+
*/
2142
public boolean inRangeInclusive(double value){
2243
return getLow() <= value && getHigh() >= value;
2344
}
2445

46+
/**
47+
* Determines whether a value is in the range (exclusive).
48+
* @param value The value to check for.
49+
* @return True if the value is in the exclusive range.
50+
*/
2551
public boolean inRangeExclusive(double value){
2652
return getLow() < value && getHigh() > value;
2753
}
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,30 @@
11
package com.kylecorry.frc.vision;
22

3+
/**
4+
* A class containing the current version numbers of the Robot Vision API.
5+
*/
36
public class Version {
7+
/**
8+
* Get the major version.
9+
* @return The major version.
10+
*/
411
public int getMajorVersion(){
512
return 1;
613
}
714

15+
/**
16+
* Get the minor version.
17+
* @return The minor version.
18+
*/
819
public int getMinorVersion(){
920
return 1;
1021
}
1122

23+
/**
24+
* Get the patch version.
25+
* @return The patch version.
26+
*/
1227
public int getPatchVersion(){
13-
return 0;
28+
return 1;
1429
}
1530
}

0 commit comments

Comments
 (0)