Publisher review:Ordinals for All Numeric Types will extend all numerical types with a method for returning the English ordinal, i.e. 1st, 2nd, 3rd, 4th, etc. This snippet will extend all numerical types with a method for returning the English ordinal, i.e. 1st, 2nd, 3rd, 4th, etc.
Note that floating-point types will suffer an implicit integer coercion without rounding. The method is based on this page, where you can find similar code in short-hand style as well (not that rewriting the following in ternary logic should prove an unsurmountable problem for anyone).
Ordinals for All Numeric Types is a Ruby script for Mathematics scripts design by Arto Bendiken.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
Operating system:Windows / Linux / Mac OS / BSD / Solaris