Generic Arithmetic

Do you want to enhance your codebase and reduce your workload by incorporating calculations into template classes?
You can bypass C# limitations thanks to Generic Arithmetic!

Easy Usage
Instantiate a new Computable or utilize static classes to perform any arithmetic operations or comparisons with generic parameters.
Generic Arithmetic does not require any additional setup, it just works!

Complete and Reliable
The tool handle all C# operators and functions flawlessly in the editor and at runtime, including in no assembly reload mode.
You can use it with any value type: system primitives, unity primitives, custom classes or structs, nullables, etc.

High performances
Generic Arithmetic can make use of the Dynamic Language Runtime to apply operations, but its default behavior is even more efficient.
By employing reflection and Linq.Expressions, the tool compiles optimized code at runtime!
This is highly performant, your players won’t notice any difference compared to non-generic code, even in hot paths!

Extendable API
To work with IL2CPP, get close to perfect performances, manually resolve operator ambiguities or add extra arithmetic capabilities to a type, all you have to do is inherit from dedicated classes!
These additions will be automatically integrated into the tool’s logic, ensuring smooth usability.

Seamless User Experience
You can configure the tool effortlessly by editing a configuration asset.
The package includes full sources (50+ scripts).
A unit test window is included, ensuring 100% effectiveness and allowing you to safely make custom changes to the scripts if you want to.

Documentation and Help
The documentation is clear and complete.
The demo is a benchmark showcasing all usage of the tool.
Contacting support via email guarantees a response within a day or less, and there is a public Discord community for additional assistance.

Regular Updates
This tool will receive updates to fix bugs and introduce new features.
If you enjoy Generic Arithmetic, please consider leaving a review. Your feedback helps improve it!

Buy The Asset
Generic Arithmetic is available at a regular price of 9.99$ here.

VERSION 1.1.0: (12/30/23)
• Added Try versions of all methods in Calculate and Evaluate
• Added a new overload to Computable<T>.From that takes a T as a parameter (same behaviour as the constructor)
• Small improvements to the documentation