[Study]Math.nextUp과 Math.nextDown을 알아보자
Math.nextUp과 Math.nextDown에 대해서 알아보자 double 또는 float의 부동 소수점 값을 알고 싶을 때 java.math 패키지의 nextUp와 nextDown을 사용하면 된다. Math.nextUp이란? Math.nextUp의 대한 내용을 다음과 같습니다. Returns the floating-point value adjacent to d in the direction of positive infinity. This method is semantically equivalent to nextAfter(d, Double.POSITIVE_INFINITY); however, a nextUp implementation may run faster than its equivalent nex..
Tech/Studies
2023. 4. 2. 14:30