mirror of https://github.com/encounter/objdiff.git
Tooltip data display: Format floats and doubles better
Floats and doubles will now always be displayed with a decimal point and one digit after it, even if they are whole numbers. Floats will also have the f suffix. This is so you can tell the data type just by glancing at the value.
This commit is contained in:
parent
70b460649c
commit
cdf3fd1780
|
@ -95,10 +95,10 @@ impl DataType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DataType::Float => {
|
DataType::Float => {
|
||||||
format!("Float: {}", Endian::read_f32(bytes))
|
format!("Float: {:?}f", Endian::read_f32(bytes))
|
||||||
}
|
}
|
||||||
DataType::Double => {
|
DataType::Double => {
|
||||||
format!("Double: {}", Endian::read_f64(bytes))
|
format!("Double: {:?}", Endian::read_f64(bytes))
|
||||||
}
|
}
|
||||||
DataType::Bytes => {
|
DataType::Bytes => {
|
||||||
format!("Bytes: {:#?}", bytes)
|
format!("Bytes: {:#?}", bytes)
|
||||||
|
|
Loading…
Reference in New Issue