Skip to content

Commit

Permalink
fix typo, improve messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ruleant committed Feb 14, 2014
1 parent 749f0b3 commit cdf9891
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/com/github/ruleant/getback_gps/lib/Orientation.java
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ private float lowPassFilter (float previousValue, float newValue) {

private float[] lowPassFilterArray (float[] previousArray, float[] newArray) {
// newArray should not be empty
if (newArray == null || newArray.length = 0) {
throw new IllegalArgumentException("newArray should not be an empty array");
if (newArray == null || newArray.length == 0) {
throw new IllegalArgumentException("parameter newArray should not be an empty array");
}

float[] returnArray = new float[newArray.length];
Expand All @@ -329,7 +329,8 @@ private float[] lowPassFilterArray (float[] previousArray, float[] newArray) {

// previousArray should have the same size as newArray
if (newArray.length != previousArray.length) {
throw new IllegalArgumentException("previousArray should have the same size as newArray");
throw new IllegalArgumentException(
"parameter previousArray should have the same size as parameter newArray");
}

for (int i = 0; i < newArray.length; i++) {
Expand Down

0 comments on commit cdf9891

Please sign in to comment.