1
0
şunun yansıması https://github.com/DanilaFe/abacus eşitlendi 2026-01-17 12:25:20 +00:00

Implement sin function and helper functions such as getSmallAngle and floor.

Bu işleme şunda yer alıyor:
Arthur Drobot
2017-08-01 15:36:54 -07:00
ebeveyn c7136f903a
işleme 661bc170fc
4 değiştirilmiş dosya ile 98 ekleme ve 0 silme

Dosyayı Görüntüle

@@ -98,6 +98,11 @@ public class NaiveNumber implements NumberInterface {
return (int) Math.ceil(value);
}
@Override
public int floor() {
return (int) Math.floor(value);
}
@Override
public NumberInterface promoteTo(Class<? extends NumberInterface> toClass) {
if (toClass == this.getClass()) return this;

Dosyayı Görüntüle

@@ -85,6 +85,12 @@ public interface NumberInterface {
*/
int ceiling();
/**
* Return the greatest integer less than or equal to the number.
* @return the greatest int >= the number, if int can hold the value.
*/
int floor();
/**
* Promotes this class to another number class.
*

Dosyayı Görüntüle

@@ -100,6 +100,11 @@ public class PreciseNumber implements NumberInterface {
return (int) Math.ceil(value.doubleValue());
}
@Override
public int floor() {
return (int) Math.floor(value.doubleValue());
}
@Override
public NumberInterface negate() {
return new PreciseNumber(value.negate());

Dosya farkları bir veya daha fazla satır çok uzun olduğundan bastırıldı