Skip to content

Commit f4cbdbe

Browse files
committed
Updated readme
1 parent dfc102e commit f4cbdbe

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ Like standard C(++) types, the fixed point numbers defined here are following so
3333
- same for `SFix`
3434
- `UFix<NI,NF>::fromRaw(T value)` will set the *internal* value of the `UFix`. For example `UFix<7,1>::fromRaw(16);` is actually 8
3535
- same for `SFix`
36+
- `UFix<NI,NF>.toFloat()` returns the value as a `float`
37+
- same for `SFix`
38+
- `UFix<NI,NF>.asRaw()` returns the internal value
39+
- same for `SFix`
3640
- all operations between fixed point number is safe (it won't overflow) and preserve the precision. In particular:
3741
- only addition, subtraction and multiplication are implemented (this is a design choice, see below)
3842
- any operation between a signed and an unsigned leads to a signed number

0 commit comments

Comments
 (0)