Add FloorTest and clean-up Floor (#4769)

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Ricardo Ramos <0102016812@grupotel.corp>
This commit is contained in:
Ricardo Ramos
2023-10-11 18:21:53 -03:00
committed by GitHub
parent 152e29034d
commit e9bbf35ff9
3 changed files with 114 additions and 28 deletions

View File

@ -1,15 +1,8 @@
package com.thealgorithms.maths;
import java.util.Random;
public final class Floor {
public class Floor {
public static void main(String[] args) {
Random random = new Random();
for (int i = 1; i <= 1000; ++i) {
double randomNumber = random.nextDouble();
assert floor(randomNumber) == Math.floor(randomNumber);
}
private Floor() {
}
/**