Trigonometric Functions#
Cake offers built in support for the standard trigonometric functions which can be found in the math library.
Modifying Handlers#
You may have noticed that functions have attributes such as Function.preprocessor, but don’t know how they can be used?
Simply set the attribute to the desired value.
from cake import *
my_awesome_pre_processor = lambda **kwds: kwds
f = Sin(Variable('x'))
f.preprocessor = my_awesome_pre_processor
## Now we can carry on doing what we want with f
Sin#
- class cake.Sin(parameter: Any, coefficient: Any = 1, power: Any = 1)[source]#
Bases:
FunctionSin function
- auto_prehandle: bool#
Whether to automatically pre-handle a value, this is right before the value is passed through the handler
Warning
this is after the value is converted to radians!
- coefficient: Any#
Functions coefficient
- parameter: Any#
Internal parameter of function
- postprocessor: Callable[[Any], Any]#
postprocessor function
- power: Any#
Power function is raised to
- prehandler: Callable[[Any], Any]#
prehandler function
ASin#
- class cake.ASin(parameter: Any, coefficient: Any = 1, power: Any = 1)[source]#
Bases:
Functionarc sin or inverse sin function
- auto_prehandle: bool#
Whether to automatically pre-handle a value, this is right before the value is passed through the handler
Warning
this is after the value is converted to radians!
- coefficient: Any#
Functions coefficient
- parameter: Any#
Internal parameter of function
- postprocessor: Callable[[Any], Any]#
postprocessor function
- power: Any#
Power function is raised to
- prehandler: Callable[[Any], Any]#
prehandler function
SinH#
- class cake.SinH(parameter: Any, coefficient: Any = 1, power: Any = 1)[source]#
Bases:
FunctionHyperbolic sin function
- auto_prehandle: bool#
Whether to automatically pre-handle a value, this is right before the value is passed through the handler
Warning
this is after the value is converted to radians!
- coefficient: Any#
Functions coefficient
- parameter: Any#
Internal parameter of function
- postprocessor: Callable[[Any], Any]#
postprocessor function
- power: Any#
Power function is raised to
- prehandler: Callable[[Any], Any]#
prehandler function
ASinH#
- class cake.ASinH(parameter: Any, coefficient: Any = 1, power: Any = 1)[source]#
Bases:
FunctionArc hyperbolic sin or inverse hyperbolic sin function
- auto_prehandle: bool#
Whether to automatically pre-handle a value, this is right before the value is passed through the handler
Warning
this is after the value is converted to radians!
- coefficient: Any#
Functions coefficient
- parameter: Any#
Internal parameter of function
- postprocessor: Callable[[Any], Any]#
postprocessor function
- power: Any#
Power function is raised to
- prehandler: Callable[[Any], Any]#
prehandler function
Cos#
- class cake.Cos(parameter: Any, coefficient: Any = 1, power: Any = 1)[source]#
Bases:
FunctionCos function
- auto_prehandle: bool#
Whether to automatically pre-handle a value, this is right before the value is passed through the handler
Warning
this is after the value is converted to radians!
- coefficient: Any#
Functions coefficient
- parameter: Any#
Internal parameter of function
- postprocessor: Callable[[Any], Any]#
postprocessor function
- power: Any#
Power function is raised to
- prehandler: Callable[[Any], Any]#
prehandler function
ACos#
- class cake.ACos(parameter: Any, coefficient: Any = 1, power: Any = 1)[source]#
Bases:
Functionarc cos or inverse cos function
- auto_prehandle: bool#
Whether to automatically pre-handle a value, this is right before the value is passed through the handler
Warning
this is after the value is converted to radians!
- coefficient: Any#
Functions coefficient
- parameter: Any#
Internal parameter of function
- postprocessor: Callable[[Any], Any]#
postprocessor function
- power: Any#
Power function is raised to
- prehandler: Callable[[Any], Any]#
prehandler function
CosH#
- class cake.CosH(parameter: Any, coefficient: Any = 1, power: Any = 1)[source]#
Bases:
FunctionHyperbolic cos function
- auto_prehandle: bool#
Whether to automatically pre-handle a value, this is right before the value is passed through the handler
Warning
this is after the value is converted to radians!
- coefficient: Any#
Functions coefficient
- parameter: Any#
Internal parameter of function
- postprocessor: Callable[[Any], Any]#
postprocessor function
- power: Any#
Power function is raised to
- prehandler: Callable[[Any], Any]#
prehandler function
ACosH#
- class cake.ACosH(parameter: Any, coefficient: Any = 1, power: Any = 1)[source]#
Bases:
FunctionArc hyperbolic cos or inverse hyperbolic cos function
- auto_prehandle: bool#
Whether to automatically pre-handle a value, this is right before the value is passed through the handler
Warning
this is after the value is converted to radians!
- coefficient: Any#
Functions coefficient
- parameter: Any#
Internal parameter of function
- postprocessor: Callable[[Any], Any]#
postprocessor function
- power: Any#
Power function is raised to
- prehandler: Callable[[Any], Any]#
prehandler function
Tan#
- class cake.Tan(parameter: Any, coefficient: Any = 1, power: Any = 1)[source]#
Bases:
Functiontan function
- auto_prehandle: bool#
Whether to automatically pre-handle a value, this is right before the value is passed through the handler
Warning
this is after the value is converted to radians!
- coefficient: Any#
Functions coefficient
- parameter: Any#
Internal parameter of function
- postprocessor: Callable[[Any], Any]#
postprocessor function
- power: Any#
Power function is raised to
- prehandler: Callable[[Any], Any]#
prehandler function
ATan#
- class cake.ATan(parameter: Any, coefficient: Any = 1, power: Any = 1)[source]#
Bases:
Functionarc tan or inverse tan function
- auto_prehandle: bool#
Whether to automatically pre-handle a value, this is right before the value is passed through the handler
Warning
this is after the value is converted to radians!
- coefficient: Any#
Functions coefficient
- parameter: Any#
Internal parameter of function
- postprocessor: Callable[[Any], Any]#
postprocessor function
- power: Any#
Power function is raised to
- prehandler: Callable[[Any], Any]#
prehandler function
ATan2#
- class cake.ATan2(parameter: Any, coefficient: Any = 1, power: Any = 1)[source]#
Bases:
Functionarc tan2 or inverse tan2 function
- auto_prehandle: bool#
Whether to automatically pre-handle a value, this is right before the value is passed through the handler
Warning
this is after the value is converted to radians!
- coefficient: Any#
Functions coefficient
- parameter: Any#
Internal parameter of function
- postprocessor: Callable[[Any], Any]#
postprocessor function
- power: Any#
Power function is raised to
- prehandler: Callable[[Any], Any]#
prehandler function
TanH#
- class cake.TanH(parameter: Any, coefficient: Any = 1, power: Any = 1)[source]#
Bases:
FunctionHyperbolic tan function
- auto_prehandle: bool#
Whether to automatically pre-handle a value, this is right before the value is passed through the handler
Warning
this is after the value is converted to radians!
- coefficient: Any#
Functions coefficient
- parameter: Any#
Internal parameter of function
- postprocessor: Callable[[Any], Any]#
postprocessor function
- power: Any#
Power function is raised to
- prehandler: Callable[[Any], Any]#
prehandler function
ATanH#
- class cake.ATanH(parameter: Any, coefficient: Any = 1, power: Any = 1)[source]#
Bases:
FunctionArc hyperbolic tan or inverse hyperbolic tan function
- auto_prehandle: bool#
Whether to automatically pre-handle a value, this is right before the value is passed through the handler
Warning
this is after the value is converted to radians!
- coefficient: Any#
Functions coefficient
- parameter: Any#
Internal parameter of function
- postprocessor: Callable[[Any], Any]#
postprocessor function
- power: Any#
Power function is raised to
- prehandler: Callable[[Any], Any]#
prehandler function