feat: Added a description to the IEEE754 decoder tool
This commit is contained in:
parent
b54e6ea531
commit
17b0f2ae77
@ -465,7 +465,8 @@
|
||||
"hex.builtin.tools.format.scientific": "Scientific",
|
||||
"hex.builtin.tools.format.standard": "Standard",
|
||||
"hex.builtin.tools.history": "History",
|
||||
"hex.builtin.tools.ieee754": "IEEE 754 Floating Point Tester",
|
||||
"hex.builtin.tools.ieee754": "IEEE 754 Floating Point Decoder",
|
||||
"hex.builtin.tools.ieee754.description": "IEEE754 is a standard for representing floating point numbers which is used by most modern CPUs.\n\nThis tool visualizes the internal representation of a floating point number and allows decoding of numbers with a non-standard number of mantissa or exponent bits.",
|
||||
"hex.builtin.tools.ieee754.double_precision": "Double Precision",
|
||||
"hex.builtin.tools.ieee754.exponent": "Exponent",
|
||||
"hex.builtin.tools.ieee754.exponent_size": "Exponent Size",
|
||||
|
@ -1113,7 +1113,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
}
|
||||
|
||||
void drawIEEE754Helper() {
|
||||
void drawIEEE754Decoder() {
|
||||
static u128 value = 0x00;
|
||||
static int exponentBitCount = 8, mantissaBitCount = 23;
|
||||
|
||||
@ -1147,6 +1147,9 @@ namespace hex::plugin::builtin {
|
||||
const auto exponentBits = ExtractBits(exponentBitPosition, exponentBitCount);
|
||||
const auto mantissaBits = ExtractBits(mantissaBitPosition, mantissaBitCount);
|
||||
|
||||
ImGui::TextFormattedWrapped("{}", "hex.builtin.tools.ieee754.description"_lang);
|
||||
ImGui::NewLine();
|
||||
|
||||
if (ImGui::BeginTable("##outer", 4, ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_NoKeepColumnsVisible | ImGuiTableFlags_ScrollX, ImVec2(0, ImGui::GetTextLineHeightWithSpacing() * 4))) {
|
||||
ImGui::TableSetupColumn("hex.builtin.tools.ieee754.sign"_lang);
|
||||
ImGui::TableSetupColumn("hex.builtin.tools.ieee754.exponent"_lang);
|
||||
@ -1326,7 +1329,7 @@ namespace hex::plugin::builtin {
|
||||
ContentRegistry::Tools::add("hex.builtin.tools.file_uploader", drawFileUploader);
|
||||
ContentRegistry::Tools::add("hex.builtin.tools.wiki_explain", drawWikiExplainer);
|
||||
ContentRegistry::Tools::add("hex.builtin.tools.file_tools", drawFileTools);
|
||||
ContentRegistry::Tools::add("hex.builtin.tools.ieee754", drawIEEE754Helper);
|
||||
ContentRegistry::Tools::add("hex.builtin.tools.ieee754", drawIEEE754Decoder);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user