srcpy package

Submodules

srcpy.libtools module

My dumb math tools This is a collection of math tools i often use. This is also an example code to test the automatic building of a code documentation.

srcpy.libtools.add(a, b)

Add two numbers and return the result.

Parameters:
  • arg1 (float) – First number to sum.

  • arg2 (float) – Second number to sum.

Returns:

Addition of the two numbers.

Return type:

float

srcpy.libtools.main()

Example application: compute ((a+b)*2) where a=3, b=5.

srcpy.libtools.mul(a, b)

Multiply two numbers and return the result.

Parameters:
  • arg1 (float) – First number to multiply.

  • arg2 (float) – Second number to multiply.

Returns:

Multiplication of the two numbers.

Return type:

float

srcpy.libtools.random_number_generator(arg1, arg2)

Random number generator in the 0-1 range.

This is an example function which generates a random number between 0 and 1 from a given seed computed from to input arguments (arg1, arg2). The seed is computed as (arg1+arg2)*(arg1+arg2)

Parameters:
  • arg1 (float) – argument 1 from which computing the seed for the random generator.

  • arg2 (float) – argument 2 from which computing the seed for the random generator.

Returns:

Random number between 0 and 1.

Return type:

float

Module contents