mirror of
https://bitbucket.org/Mattrixwv/javaclasses.git
synced 2025-12-06 15:03:58 -05:00
Fixed typos
This commit is contained in:
@@ -501,7 +501,7 @@ public class Algorithms{
|
||||
//Return the list
|
||||
return divisors;
|
||||
}
|
||||
//This function returns all the divisors of goalNumber
|
||||
//This function returns all the divisors of goalSubscript
|
||||
public static int getFib(int goalSubscript){
|
||||
//Setup the variables
|
||||
int[] fibNums = {1, 1, 0}; //A list to keep track of the Fibonacci numbers. It need only be 3 long because we only need the one we are working on and the last 2
|
||||
@@ -517,7 +517,7 @@ public class Algorithms{
|
||||
fibNums[fibLoc % 3] = fibNums[(fibLoc - 1) % 3] + fibNums[(fibLoc - 2) % 3];
|
||||
}
|
||||
|
||||
//Return the propper number. The location counter is 1 off of the subscript
|
||||
//Return the proper number. The location counter is 1 off of the subscript
|
||||
return fibNums[(fibLoc - 1) % 3];
|
||||
}
|
||||
public static long getFib(long goalSubscript){
|
||||
@@ -535,7 +535,7 @@ public class Algorithms{
|
||||
fibNums[fibLoc % 3] = fibNums[(fibLoc - 1) % 3] + fibNums[(fibLoc - 2) % 3];
|
||||
}
|
||||
|
||||
//Return the propper number. The location counter is 1 off of the subscript
|
||||
//Return the proper number. The location counter is 1 off of the subscript
|
||||
return fibNums[(fibLoc - 1) % 3];
|
||||
}
|
||||
public static BigInteger getFib(BigInteger goalSubscript){
|
||||
@@ -553,7 +553,7 @@ public class Algorithms{
|
||||
fibNums[fibLoc % 3] = fibNums[(fibLoc - 1) % 3].add(fibNums[(fibLoc - 2) % 3]);
|
||||
}
|
||||
|
||||
//Return the propper number. The location counter is 1 off of the subscript
|
||||
//Return the proper number. The location counter is 1 off of the subscript
|
||||
return fibNums[(fibLoc - 1) % 3];
|
||||
}
|
||||
//This function returns a list of all Fibonacci numbers <= goalNumber
|
||||
|
||||
Reference in New Issue
Block a user