One Animation Logo

REPOS

APIDOCS

mymath.arithmetics

mymath.arithmetics contains the arithmetics classes and functions for our beloved mymath namespace

Note

Never underestimate the complexity of arithmetics

Package Contents

Classes

AddSub

Collection of subtraction and addition operations

MultDivide

Collection of multiply and divide operations

Functions

mod

This module implements some simple math functions

power(x, y)

class mymath.arithmetics.AddSub

Collection of subtraction and addition operations

This is the __init__ function

static add(x, y)

This module adds two numbers

Parameters
  • x (int) – first number

  • y (int) – second number

Returns

sum of two numbers

static subtract(x, y)

This module subtracts two numbers

Parameters
  • x (int) – first number

  • y (int) – second number

Returns

difference between the two numbers

class mymath.arithmetics.MultDivide

Collection of multiply and divide operations

static multiply(x, y)

This module multiplies two numbers

Parameters
  • x (int) – first number

  • y (int) – second number

Returns

product of two numbers

static divide(x, y)

This module divides two numbers

Parameters
  • x (int) – first number

  • y (int) – second number

Returns

product of two numbers

mymath.arithmetics.mod(x: int, y: int)

Returns mod of the two numbers

mymath.arithmetics.power(x: int, y: int)