Skip to main content

module to handle advanced math operations

Project description

advanced_math module to handle advanced math operations

Documentation

NAME advanced_math - advanced_math module for handling some advanced mathamatical operations

CLASSES builtins.object Point Point3D Vector2 Vector3

class Point(builtins.object)
 |  Point(x, y, formatting='default')
 |  
 |  Creates a 2D point object
 |  
 |  Methods defined here:
 |  
 |  __add__(self, another_point)
 |  
 |  __eq__(self, another_point)
 |      Return self==value.
 |  
 |  __init__(self, x, y, formatting='default')
 |      Initialize self.  See help(type(self)) for accurate signature.
 |  
 |  __repr__(self)
 |      Return repr(self).
 |  
 |  __str__(self)
 |      Return str(self).
 |  
 |  __sub__(self, another_point)
 |  
 |  distance(self, another_point)
 |      Calculates the distance between two points
 |      :param another_point: Point
 |      :return: float
 |  
 |  form_vector2(self, another_point)
 |      Returns a new Vector2 object having x and y of subtraction of first point and second point.
 |      :param another_point: Point
 |      :return: Vector2
 |  
 |  format(self, formatting)
 |      Changes the format in which the point is printed (converted into str).
 |      Supported formats are: default, standard, expanded.
 |      Although, it doesn't throw errors if any invalid formatting is presented, it's a bad practice doing that!
 |      :param formatting: str
 |      :return: None
 |  
 |  to_tuple(self)
 |      Returns the point object in a tuple form
 |      :return: Tuple
 |  
 |  ----------------------------------------------------------------------
 |  Static methods defined here:
 |  
 |  from_seq(sequence)
 |  
 |  make_point_from_seq(sequence)
 |      Creates a new point using a sequence
 |      :param sequence: Sequence
 |      :return: Point
 |  
 |  origin()
 |      Returns the origin point
 |      :return: Point
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors defined here:
 |  
 |  __dict__
 |      dictionary for instance variables (if defined)
 |  
 |  __weakref__
 |      list of weak references to the object (if defined)
 |  
 |  ----------------------------------------------------------------------
 |  Data and other attributes defined here:
 |  
 |  __hash__ = None

class Point3D(builtins.object)
 |  Point3D(x, y, z, formatting='default')
 |  
 |  Creates a 3D point object
 |  
 |  Methods defined here:
 |  
 |  __add__(self, another_point)
 |  
 |  __eq__(self, another_point)
 |      Return self==value.
 |  
 |  __init__(self, x, y, z, formatting='default')
 |      Initialize self.  See help(type(self)) for accurate signature.
 |  
 |  __repr__(self)
 |      Return repr(self).
 |  
 |  __str__(self)
 |      Return str(self).
 |  
 |  __sub__(self, another_point)
 |  
 |  distance(self, another_point)
 |      Calculates the distance between two points
 |      :param another_point: Point3D
 |      :return: float
 |  
 |  form_vector3(self, another_point)
 |      TODO: IMPLEMENT AFTER VECTOR3
 |      Returns a new Vector2 object having x and y of subtraction of first point and second point.
 |      :param another_point: Point
 |      :return: Vector2
 |  
 |  format(self, formatting)
 |      Changes the format in which the point3D is printed (converted into str).
 |      Supported formats are: default, standard, expanded.
 |      Although, it doesn't throw errors if any invalid formatting is presented, it's a bad practice doing that!
 |      :param formatting: str
 |      :return: None
 |  
 |  to_tuple(self)
 |      Returns the point3D object in a tuple form
 |      :return: Tuple
 |  
 |  ----------------------------------------------------------------------
 |  Static methods defined here:
 |  
 |  from_seq(sequence)
 |      Creates a new point using a sequence
 |      :param sequence: Sequence
 |      :return: Point3D
 |  
 |  origin()
 |      Returns the origin point
 |      :return: Point3D
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors defined here:
 |  
 |  __dict__
 |      dictionary for instance variables (if defined)
 |  
 |  __weakref__
 |      list of weak references to the object (if defined)
 |  
 |  ----------------------------------------------------------------------
 |  Data and other attributes defined here:
 |  
 |  __hash__ = None

class Vector2(builtins.object)
 |  Vector2(x, y, formatting='default')
 |  
 |  Creates a new 2D vector object
 |  
 |  Methods defined here:
 |  
 |  __add__(self, another_vector)
 |  
 |  __eq__(self, another_vector)
 |      Return self==value.
 |  
 |  __floordiv__(self, value)
 |  
 |  __init__(self, x, y, formatting='default')
 |      Initialize self.  See help(type(self)) for accurate signature.
 |  
 |  __mul__(self, value)
 |  
 |  __repr__(self)
 |      Return repr(self).
 |  
 |  __str__(self)
 |      Return str(self).
 |  
 |  __sub__(self, another_vector)
 |  
 |  __truediv__(self, value)
 |  
 |  direction(self)
 |      Calculates the direction of a vector
 |      :return: float
 |  
 |  format(self, formatting)
 |      Changes the format in which the vector is printed (converted into str).
 |      Supported formats are: default, standard, expanded.
 |      Although, it doesn't throw errors if any invalid formatting is presented, it's a bad practice doing that!
 |      :param formatting: str
 |      :return: None
 |  
 |  from_seq(sequence)
 |  
 |  magnitude(self)
 |      Calculates the magnitude of a 2D vector
 |      :return: float
 |  
 |  to_tuple(self)
 |      Returns the vector object in a tuple form
 |      :return: Tuple
 |  
 |  ----------------------------------------------------------------------
 |  Static methods defined here:
 |  
 |  down()
 |      Returns a unit vector in positive y direction
 |  
 |  left()
 |      Returns a unit vector in negative x direction
 |  
 |  make_vector_from_seq(sequence)
 |      Creates a new vector using a sequence
 |      :param sequence: Sequence
 |      :return: Vector2
 |  
 |  right()
 |      Returns a unit vector in positive x direction
 |  
 |  up()
 |      Returns a unit vector in negative y direction
 |  
 |  zero()
 |      Returns the null or zero vector
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors defined here:
 |  
 |  __dict__
 |      dictionary for instance variables (if defined)
 |  
 |  __weakref__
 |      list of weak references to the object (if defined)
 |  
 |  ----------------------------------------------------------------------
 |  Data and other attributes defined here:
 |  
 |  __hash__ = None

class Vector3(builtins.object)
 |  Vector3(x, y, z, formatting='default')
 |  
 |  Creates a new 3D vector object
 |  
 |  Methods defined here:
 |  
 |  __add__(self, another_vector)
 |  
 |  __eq__(self, another_vector)
 |      Return self==value.
 |  
 |  __floordiv__(self, value)
 |  
 |  __init__(self, x, y, z, formatting='default')
 |      Initialize self.  See help(type(self)) for accurate signature.
 |  
 |  __mul__(self, value)
 |  
 |  __repr__(self)
 |      Return repr(self).
 |  
 |  __str__(self)
 |      Return str(self).
 |  
 |  __sub__(self, another_vector)
 |  
 |  __truediv__(self, value)
 |  
 |  direction(self)
 |      TODO: IMPLEMENT LATER
 |      Calculates the direction of a vector
 |      :return: float
 |  
 |  format(self, formatting)
 |      Changes the format in which the vector is printed (converted into str).
 |      Supported formats are: default, standard, expanded.
 |      Although, it doesn't throw errors if any invalid formatting is presented, it's a bad practice doing that!
 |      :param formatting: str
 |      :return: None
 |  
 |  from_seq(sequence)
 |      Creates a new vector using a sequence
 |      :param sequence: Sequence
 |      :return: Vector2
 |  
 |  magnitude(self)
 |      Calculates the magnitude of a 3D vector
 |      :return: float
 |  
 |  to_tuple(self)
 |      Returns the vector object in a tuple form
 |      :return: Tuple
 |  
 |  ----------------------------------------------------------------------
 |  Static methods defined here:
 |  
 |  down()
 |      Returns a unit vector in positive y direction
 |  
 |  inward()
 |      Returns a unit vector in positive z direction
 |  
 |  left()
 |      Returns a unit vector in negative x direction
 |  
 |  outward()
 |      Returns a unit vector in negative z direction
 |  
 |  right()
 |      Returns a unit vector in positive x direction
 |  
 |  up()
 |      Returns a unit vector in negative y direction
 |  
 |  zero()
 |      Returns the null or zero vector
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors defined here:
 |  
 |  __dict__
 |      dictionary for instance variables (if defined)
 |  
 |  __weakref__
 |      list of weak references to the object (if defined)
 |  
 |  ----------------------------------------------------------------------
 |  Data and other attributes defined here:
 |  
 |  __hash__ = None

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

advanced_math-0.0.5-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file advanced_math-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: advanced_math-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.23.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.2

File hashes

Hashes for advanced_math-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9605f2681f599ee2aa2b92880846a5886f580bbe5bb068c75a24f6ac9988a838
MD5 c1100be0019f6fdcf4d3438ebe638198
BLAKE2b-256 9c8583ea2632fd1a3fe10508c92d3a68805b80de1b0507ede0146323ce329035

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page