Code Monkey home page Code Monkey logo

poverlap's Introduction

POVERLAP

POverlap or Point Overlap is pure python library For Check Overlapping or Colliding 2D Point With Any 2D Shape. And Work Everywhere.

Installation

Install library like other library use pip package manager.

pip install poverlap
py -m pip install poverlap

Usage

First Importing poverlap Package

import poverlap

then use any function you needed

point_a = (10, 200)
point_b = (30, 100)

pdp: float = poverlap.point_distance(point_a, point_b)

pop: bool = poverlap.point_point(point_a, point_b)
pop_area: bool = poverlap.point_point_add_area(point_a, point_b, 5.5)

Some Detail

All Overlapping Point Algorithm in One File and Any File Fully NoDepended Can Use One File From poverlap in your app without need anything else.

TypeAliases Mean:

# in point_point.py
T_X: TypeAlias = int | float
T_Y: TypeAlias = int | float
T_POINT: TypeAlias = tuple[T_X, T_Y], list[T_X, T_Y]

# added in point_line.py
T_LINE: TypeAlias = tuple[T_POINT, T_POINT], list[T_POINT, T_POINT]

# added in point_rectangle.py
T_W: TypeAlias = int | float
T_H: TypeAlias = int | float
T_POSITION: TypeAlias = T_POINT
T_SIZE: TypeAlias = tuple[T_W, T_H], list[T_W, T_H]

# added in point_circle.py
T_RADIUS: TypeAlias = int |float

# added in point_polygon.py
T_POLYGON: TypeAlias = tuple[T_POSITION], list[T_POSITION]

Some of Function Name Ended With _add_area() like point_point_add_area() this means u can Use for Bigger or Some Bigger and Smaller Area for Detection Overlapping.

SourceCode

License

MIT

poverlap's People

Contributors

irtj avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.