mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
Userland: Use AK::pow<I> where applicable
This commit is contained in:
parent
9ba9691d19
commit
3e135f347f
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