mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 19:19:30 +00:00
Userland: Use AK::pow<I> where applicable
This commit is contained in:
parent
9ba9691d19
commit
3e135f347f
Notes:
sideshowbarker
2024-07-17 19:42:25 +09:00
Author: https://github.com/Hendiadyoin1
Commit: 3e135f347f
Pull-request: https://github.com/SerenityOS/serenity/pull/12163
Reviewed-by: https://github.com/BertalanD ✅
3 changed files with 14 additions and 11 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "Keypad.h"
|
||||
#include "KeypadValue.h"
|
||||
#include <AK/Math.h>
|
||||
#include <AK/IntegralMath.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
|
||||
Keypad::Keypad()
|
||||
|
@ -119,8 +119,8 @@ void Keypad::set_value(KeypadValue value)
|
|||
} else
|
||||
m_negative = false;
|
||||
|
||||
m_int_value = value.m_value / (u64)AK::pow(10.0, (double)value.m_decimal_places);
|
||||
m_frac_value = value.m_value % (u64)AK::pow(10.0, (double)value.m_decimal_places);
|
||||
m_int_value = value.m_value / AK::pow<u64>(10, value.m_decimal_places);
|
||||
m_frac_value = value.m_value % AK::pow<u64>(10, value.m_decimal_places);
|
||||
m_frac_length = value.m_decimal_places;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue