목록공부/TIL (31)
저장을 습관화
230530 TIL
1. Math Math.ceil() 소수점 올림 Math.ceil(.95); // 1 Math.ceil(4); // 4 Math.ceil(7.004); // 8 Math.ceil(-0.95); // -0 Math.ceil(-4); // -4 Math.ceil(-7.004); // -7 Math.floor() 소수점 내림 Math.floor( 45.95); // 45 Math.floor( 45.05); // 45 Math.floor( 4 ); // 4 Math.floor(-45.05); // -46 Math.floor(-45.95); // -46 Math.round() 소수점 반올림 Math.round( 20.49); // 20 Math.round( 20.5 ); // 21 Math.round( 42 );..
공부/TIL
2023. 5. 30. 21:46