Skip to content

Commit 7360f2d

Browse files
committed
Fix range of SFix for normal cases
1 parent ab4cd87 commit 7360f2d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/FixMath.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ namespace FixMathPrivate {
157157
// Alias declaration for a UFix type with the suitable NI count given RANGE and NF
158158
template<int8_t NF, uint64_t RANGE> using UFixByRange_t=UFix<NIcount<RANGE>()-NF, NF, RANGE>;
159159
// Alias declaration for an SFix type with the suitable NI count given RANGE and NF
160-
template<int8_t NF, uint64_t RANGE> using SFixByRange_t=SFix<NIcount<RANGE>()-NF, NF, RANGE>;
160+
template<int8_t NF, uint64_t RANGE> using SFixByRange_t=SFix<NIcount<RANGE-1>()-NF, NF, RANGE>;
161161
}
162162

163163
/** Instanciate an unsigned fixed point math number.

0 commit comments

Comments
 (0)