mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:27:45 +00:00
AK: Add LogStream operator<< overloads for float and double
This commit is contained in:
parent
5c780c9ef7
commit
3bbc2c7300
2 changed files with 16 additions and 0 deletions
|
@ -181,6 +181,17 @@ void StdLogStream::write(const char* characters, int length) const
|
|||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
}
|
||||
|
||||
const LogStream& operator<<(const LogStream& stream, double value)
|
||||
{
|
||||
return stream << String::format("%.4f", value);
|
||||
}
|
||||
|
||||
const LogStream& operator<<(const LogStream& stream, float value)
|
||||
{
|
||||
return stream << String::format("%.4f", value);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue