compute<T> method
Computes a function that requires the value of π.
This method takes a function that accepts a Decimal parameter and returns a Decimal result, and applies it to the value property of the current PI object, which represents the decimal value of π with the specified precision.
Parameters:
Returns: The result of applying the provided function to the value of the current PI object.
Implementation
Decimal compute<T>(Decimal Function(Decimal) func) {
return func(value);
}