| <?xml version="1.0" encoding="utf-8"?> |
| <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> |
| |
| <!-- bu_math::fixed<FRAC_BITS>: shows the floating point value and the raw |
| integer side by side, for ALL FRAC_BITS instantiations ($T1 is the |
| template argument). Covers fixed16_16, fixed8_24, fixed24_8, etc., and |
| applies elementwise inside arrays, vectors, and watch expressions. --> |
| <Type Name="bu_math::fixed<*>"> |
| <DisplayString>{(double)v / (double)(1 << $T1),g} (raw {v})</DisplayString> |
| <Expand> |
| <Item Name="[value]">(double)v / (double)(1 << $T1)</Item> |
| <Item Name="[raw]">v</Item> |
| <Item Name="[raw hex]">v,x</Item> |
| <Item Name="[int part (floor)]">v >> $T1</Item> |
| <Item Name="[frac raw]">v & ((1 << $T1) - 1)</Item> |
| <Item Name="[frac bits]">$T1</Item> |
| </Expand> |
| </Type> |
| |
| </AutoVisualizer> |