mirror of
https://github.com/TheAlgorithms/Java.git
synced 2026-03-13 08:40:43 +08:00
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:
@@ -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() {
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user