mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-07 01:35:16 +08:00
Add testcase to Ceil Algorithm (#3183)
Co-authored-by: Yang Libin <contact@yanglibin.info>
This commit is contained in:
@ -4,14 +4,6 @@ import java.util.Random;
|
||||
|
||||
public class Ceil {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Random random = new Random();
|
||||
for (int i = 1; i <= 1000; ++i) {
|
||||
double randomNumber = random.nextDouble();
|
||||
assert ceil(randomNumber) == Math.ceil(randomNumber);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the smallest (closest to negative infinity)
|
||||
*
|
||||
|
Reference in New Issue
Block a user