LibJS: Add support for Math.ceil() and Math.trunc()

Introduce support for the both of these Math methods.
Math.trunc is implemented in terms of Math.ceil or Math.floor
based on the input value. Added tests as well.
This commit is contained in:
Brian Gianforcaro 2020-04-05 01:35:50 -07:00 committed by Andreas Kling
commit 240a5b5fd7
Notes: sideshowbarker 2024-07-19 07:54:29 +09:00
4 changed files with 66 additions and 0 deletions

View file

@ -42,8 +42,10 @@ private:
static Value random(Interpreter&);
static Value sqrt(Interpreter&);
static Value floor(Interpreter&);
static Value ceil(Interpreter&);
static Value round(Interpreter&);
static Value max(Interpreter&);
static Value trunc(Interpreter&);
};
}