James Aguilar
813c17c039
Add a CMakeLists.txt that allows this to be used as an IDF component.
3 months ago
James Aguilar
5c2b12acd1
Depend on Arduino.h only if platform is AVR
...
When the platform is not Arduino, we can't use
random(), but that appears to be the only Arduino
dep in the entire library. Avoiding a dependency
on Arduino allows using the FixedPoint library
on native, which is useful for unit tests.
3 months ago
Pharap
149c81247a
Update to v1.1.2
2 years ago
Pharap
def0ef29f1
Fix SFixed conversion by making ShiftType signed ( #100 )
...
`SFixed`'s conversion operator isn't functioning correctly because the shifting is being done with an unsigned type.
This rectifies that by changing `SFixed`'s `ShiftType` to a signed integer type.
2 years ago
Pharap
b61dd1a2c8
Update to v1.1.1
3 years ago
Pharap
79ef8398f3
Fix bug in IdentityMask calculation ( #99 )
...
The bit width of the type was not being sufficiently increased, which was leading to dropped bits, which in turn caused problems with floating point conversion and possibly other problems.
3 years ago
Pharap
5411bf0a73
Delete LICENSE
3 years ago
Pharap
0e631fe210
Update bug-report.md
3 years ago
Pharap
e5103ac2eb
Update to v1.1.0
4 years ago
Pharap
5eadcbadf3
Add integer conversion operators ( #94 )
...
Adds operators for converting to all the main integer types.
4 years ago
Pharap
ea71949e81
Add conversion operators for SFixed and UFixed ( #93 )
...
This will finally allow SFixed and UFixed to be converted to and from each other.
4 years ago
Pharap
109d1d21fd
Add postincrement and postdecrement operators ( #86 )
4 years ago
Pharap
d8c2300585
Fix shift overflow bug in ++ and -- ( #85 )
4 years ago
Pharap
892df22ee8
Implement bitwise shift operators ( #82 )
...
The bitwise shift operators are provided solely for optimisation purposes.
4 years ago
Pharap
af74462255
Create pull_request_template.md ( #81 )
4 years ago
Pharap
1431544444
Improve issue templates ( #80 )
4 years ago
Pharap
fab9c91b33
Create issue templates ( #79 )
4 years ago
Pharap
00ce47ffed
Update to v1.0.8
4 years ago
Pharap
d84ac2517b
Update licence year ( #77 )
4 years ago
Pharap
0954fd423f
Disable random numbers for non-AVR targets ( #74 )
4 years ago
Pharap
36c5368696
Remove redundant inline specifiers ( #72 )
4 years ago
Pharap
8d0ef25aec
Correct minor mistakes
5 years ago
Pharap
daae25615f
Ensure that 'static' comes before 'constexpr' ( #65 )
...
This commit is purely to bring the code in the library more in line with my personal code style.
6 years ago
Pharap
080ffa2f5d
Remove redundant consts ( #64 )
...
Remove consts where constexpr is also in effect as constexpr implies const.
6 years ago
Pharap
15b1b3010e
Remove void in zero-parameter functions ( #63 )
...
The isocpp FAQ recommends against this practice.
6 years ago
Pharap
b322451f2e
Add FManga's Pod Manager to the Project Showcase
6 years ago
Pharap
188cf04fce
Improve wording of licence requirements
7 years ago
Pharap
fb3f82fd72
Improve operator generation macros ( #58 )
7 years ago
Pharap
096cd8cc83
Improve ternary consistency within Utils.h ( #57 )
7 years ago
Pharap
299199c98b
Update to v1.0.7
7 years ago
Pharap
4126403121
Update licence year ( #54 )
7 years ago
Pharap
64c83ca5ce
Reorganise constants and type aliases ( #53 )
...
This new arrangement is more logical and reduces the amount of repetition involved in the definitions.
7 years ago
Pharap
4d3f82c3ca
Fix width of integer literal in Scale definition ( #52 )
...
Previously the literal was of type `unsigned long long`.
This uses a macro from the fixed-width literal API to give the literal a type of `uintmax_t`.
7 years ago
Pharap
529692d81c
Change member constants to uintmax_t ( #51 )
...
This makes the typing of `SFixed`'s constants match the typing of `UFixed`'s constants.
7 years ago
Pharap
6054d11516
Remove UFixedBase and SFixedBase ( #46 )
...
* Delete SFixedBase.h
* Delete UFixedBase.h
7 years ago
Pharap
ff3308fd96
Remove superfluous constructors ( #45 )
7 years ago
Pharap
0d064ef75d
Fix bug in definition of UFixedBase::IntegerType ( #39 )
7 years ago
Pharap
d0c20218ca
Add long double conversion operator ( #34 )
7 years ago
Pharap
fc3de879b1
Update licence ( #33 )
...
* Update LICENSE
* Update LICENCE
7 years ago
Pharap
e5ac682a12
Fix bug in roundFixed ( #32 )
...
The bug was due to part of the former code being left in by mistake.
7 years ago
Pharap
c3994a06d5
Update to v1.0.6
7 years ago
Pharap
ca8df686ea
Add simple preliminary FAQ ( #27 )
7 years ago
Pharap
8a98bd8629
Add descriptive error for multiplication ( #26 )
...
Provides a better error message for when multiplication can't be used because the required precision type is too large.
7 years ago
Pharap
39d259cb03
Add Project Showcase ( #25 )
7 years ago
Pharap
daee1128a7
Replace inferred literal types ( #24 )
...
Replace inferred types of literals with fundamental types.
7 years ago
Pharap
a2660d2cec
Update to v1.0.5
7 years ago
Pharap
8d308632a5
Add Arduino Due support ( #16 )
...
Automatically disables random number functionality for Arduino Due.
7 years ago
Pharap
5880da2e35
Add Serial.begin for boards that need it ( #15 )
...
Some Arduino boards require `Serial.begin` (e.g. the Uno and the Due) whilst others appear to not need it (e.g. the Arduboy).
7 years ago
Pharap
05f8ae0c83
Remove Min and Max functions ( #14 )
...
The functions were conflicting with some Arduino Due macros and they weren't being used, so they've been removed.
7 years ago
Pharap
4f8fe99153
Simplify both versions of roundFixed ( #12 )
...
These simplifications slightly reduce the size of the generated code.
7 years ago