Skip to content

Commit

Permalink
Fixed usage of IntegerType
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcombriat committed Nov 13, 2023
1 parent bcd202e commit cb2ee4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions FixMath2.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class UFixMath2
/** Constructor
*/
UFixMath2() {;}
UfixMath2(float fl) {internal_value = static_cast<typename IntegerType< ((NI+NF)>>3)> > (fl * (1 << NF));}
UfixMath2(typename IntegerType<((NI)>>3)> integral_part, typename IntegerType<((NF)>>3)>fractionnal_part)
UfixMath2(float fl) {internal_value = static_cast<typename IntegerType<((NI+NF)>>3)>::unsigned_type > (fl * (1 << NF));}
UfixMath2(typename IntegerType<((NI)>>3)>::unsigned_type integral_part, typename IntegerType<((NF)>>3)>::unsigned_type fractionnal_part)
{
internal_value = (integral_part << NI) + fractionnal_part;
} // probably a more confusing than anything constructor!
Expand Down

0 comments on commit cb2ee4f

Please sign in to comment.