Skip to main content

This is the simplest module for quick work with 2D vectors

Project description

Lines Methods Library

What is this?

The module allows you to work with vectors in 2D coordinates like [x1, y1, x2, y2].

Quick Guide

The module is based on the following structure:

vector = [1, 1, 5, 2]
length = get_length(coordinates=vector)

Using

Using the library is as simple and convenient as possible:

Let's import it first: First, import everything from the library (use the from ...import construct).

Examples of some operations:

Finding the intersection point of two vectors using the get_intersection() function:

intersection = get_intersection(line_a, line_b)

Finding the length of the vector using the get_length() function:

length = get_length(coordinates)

Finding the angle between two vectors using the get_angle_between_lines() function:

angle = get_angle_between_lines(line_a, line_b)

Stretch the line in both directions using the extend_line() function:

new_coordinates = extend_line(line, extend_length)    

Finding the midpoint using the get_medium_point_from_line() function:

medium_point = get_medium_point_from_line(line)

Developer

My github: Ugryumov_AV

Project details


Download files

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

Source Distribution

lines_methods-0.0.8.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lines_methods-0.0.8-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file lines_methods-0.0.8.tar.gz.

File metadata

  • Download URL: lines_methods-0.0.8.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for lines_methods-0.0.8.tar.gz
Algorithm Hash digest
SHA256 2bfeee3a8d12d8b3ebd161ab5a688c1094da44dc54232c5c258bf80a5aaaabe8
MD5 c04ef163b508cc51e084a64cf80d6f90
BLAKE2b-256 f1fac655c31f26be49b47a33cf2257d8b8b580cda1fb2c9b6c32f3fa206974ae

See more details on using hashes here.

File details

Details for the file lines_methods-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: lines_methods-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for lines_methods-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 9019ee3b56f4154daff768569078f1630e304a8221fa3da3e063ce8cbc866f08
MD5 d88bc0abf99b192d2845124b1e7055f3
BLAKE2b-256 d08c5145bb61b2de3a006ca26318aa8606dfde205d6f8ef91759b50102a0ecb7

See more details on using hashes here.

Supported by

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