mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
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:
parent
4ea71c9571
commit
240a5b5fd7
Notes:
sideshowbarker
2024-07-19 07:54:29 +09:00
Author: https://github.com/bgianfo
Commit: 240a5b5fd7
Pull-request: https://github.com/SerenityOS/serenity/pull/1638
Reviewed-by: https://github.com/awesomekling ✅
4 changed files with 66 additions and 0 deletions
|
@ -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&);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue