Notice
Recent Posts
Archives
04-27 14:06
반응형
관리 메뉴

Tegi Log : 블록체인, 축구, 소레어, Sorare 컨텐츠망상공간

#JavaScript - Math.floor() Math.Round() Math.Ceil() 내림, 반올림, 올림으로 소숫점을 없애보자! 본문

Development/JavaScript

#JavaScript - Math.floor() Math.Round() Math.Ceil() 내림, 반올림, 올림으로 소숫점을 없애보자!

Tegi 2022. 7. 3. 14:08
반응형

 

Math.floor(1.9)

Math.floor()는 소숫점이 무엇이든 내림을 해서 1로 만들어주는 모습을 볼 수 있다.

 

 

Math.round(1.6);

Math.round()는 반올림을 해준다.

 

Math.ceil(1.75)

Math.ceil()은 올림을 해주는 것을 볼 수 있다.

반응형
Comments