Merge "UWB: Annotate AngleMeasurement Parameters" am: bef37a3dc8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652207 Change-Id: I28c678a9ed0e9622e9973bdbbc27079d492e25f3
This commit is contained in:
committed by
Automerger Merge Worker
commit
19fc9b4b92
@@ -12440,7 +12440,7 @@ package android.util {
|
|||||||
package android.uwb {
|
package android.uwb {
|
||||||
|
|
||||||
public final class AngleMeasurement implements android.os.Parcelable {
|
public final class AngleMeasurement implements android.os.Parcelable {
|
||||||
ctor public AngleMeasurement(double, double, double);
|
ctor public AngleMeasurement(@FloatRange(from=-3.141592653589793, to=3.141592653589793) double, @FloatRange(from=0.0, to=3.141592653589793) double, @FloatRange(from=0.0, to=1.0) double);
|
||||||
method public int describeContents();
|
method public int describeContents();
|
||||||
method @FloatRange(from=0.0, to=1.0) public double getConfidenceLevel();
|
method @FloatRange(from=0.0, to=1.0) public double getConfidenceLevel();
|
||||||
method @FloatRange(from=0.0, to=3.141592653589793) public double getErrorRadians();
|
method @FloatRange(from=0.0, to=3.141592653589793) public double getErrorRadians();
|
||||||
|
|||||||
@@ -48,7 +48,10 @@ public final class AngleMeasurement implements Parcelable {
|
|||||||
* @throws IllegalArgumentException if the radians, errorRadians, or confidenceLevel is out of
|
* @throws IllegalArgumentException if the radians, errorRadians, or confidenceLevel is out of
|
||||||
* allowed range
|
* allowed range
|
||||||
*/
|
*/
|
||||||
public AngleMeasurement(double radians, double errorRadians, double confidenceLevel) {
|
public AngleMeasurement(
|
||||||
|
@FloatRange(from = -Math.PI, to = +Math.PI) double radians,
|
||||||
|
@FloatRange(from = 0.0, to = +Math.PI) double errorRadians,
|
||||||
|
@FloatRange(from = 0.0, to = 1.0) double confidenceLevel) {
|
||||||
if (radians < -Math.PI || radians > Math.PI) {
|
if (radians < -Math.PI || radians > Math.PI) {
|
||||||
throw new IllegalArgumentException("Invalid radians: " + radians);
|
throw new IllegalArgumentException("Invalid radians: " + radians);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user