Skip to content

Commit

Permalink
#904 TRational/TURational unit classes Prado\Util\Math (#934)
Browse files Browse the repository at this point in the history
* #904 TRational unit classes Prado\Util\Math

A Rational is found in EXIF and is common in its GPS "directory".  This parses and generates rationals and unsigned rationals into various formats, float, string (eg. `13/8`) and array (eg. `[13, 8]`).

The star method of this class is the Continued Fraction computation to generate the integer numerator and integer denominator from a float, to a specific tolerance.

Updated TBitHelper with specific max, min, unsigned max, and mask for 32 bit and 64 bit integers, when the values are needed and not just the system values.

* TRational[null] Another access option

* Removed TRational::__Invoke as redundant

added example code to the php doc
  • Loading branch information
belisoful authored May 3, 2023
1 parent 2230510 commit 44a4ced
Show file tree
Hide file tree
Showing 7 changed files with 1,012 additions and 0 deletions.
2 changes: 2 additions & 0 deletions framework/Exceptions/messages/messages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,8 @@ dbcron_property_unchangeable = TDbCronModule.{0} is already initialized and ca

timescheduler_invalid_string = TTimeScheduler could not parse the schedule element '{0}'

rational_bad_offset = "{0}" is not a valid property accessor of TRational.

bithelper_bad_fp_format = TBitHelper cannot work with '{0}' exponent bits, '{1}' mantissa bits, '{2}' exponent bias, in a {3} bit PHP environment.
bithelper_invalid_color_in = TBitHelper must have at least one In Bit. '{0}' was given.
bithelper_invalid_color_out = TBitHelper must have at least one Out Bit. '{0}' was given.
Expand Down
Loading

0 comments on commit 44a4ced

Please sign in to comment.