geo-cal

Crates.iogeo-cal
lib.rsgeo-cal
version0.1.1
created_at2025-12-31 17:37:46.459606+00
updated_at2026-01-02 13:10:25.92818+00
descriptionA cli tool to calcuate analytical geometry questions, like distances, circle, parabola and more with guided steps.
homepage
repositoryhttps://github.com/nathezek/geo-cal.git
max_upload_size
id2015059
size23,298
Nate (nathezek)

documentation

README

Geo / Cal

Geo / Cal is a simple command-line application written in Rust that calculates the distance between two points in 2D space. This application uses the Euclidean distance formula to provide accurate distance calculations.

Features

  • Calculate the distance between two points in 2D space.
  • User-friendly command-line interface.
  • Handles invalid input gracefully.
  • Option to exit the program at any time by entering 'q' or 'quit'.

Installation

You can install Geo / Cal using Cargo, Rust's package manager. Simply run the following command:

cargo install geo-cal

Usage

geo-cal

Example interaction

 ██████╗ ███████╗ ██████╗     ██╗ ██████╗ █████╗ ██╗
██╔════╝ ██╔════╝██╔═══██╗   ██╔╝██╔════╝██╔══██╗██║
██║  ███╗█████╗  ██║   ██║  ██╔╝ ██║     ███████║██║
██║   ██║██╔══╝  ██║   ██║ ██╔╝  ██║     ██╔══██║██║
╚██████╔╝███████╗╚██████╔╝██╔╝   ╚██████╗██║  ██║███████╗
 ╚═════╝ ╚══════╝ ╚═════╝ ╚═╝     ╚═════╝╚═╝  ╚═╝╚══════╝



--------- Main Menu -----------
1. Distance calculation
2. Distance of Line Segment
l. List all forms of line equations
q. Quit program
Enter your choice (1, 2, 3, 4 or q): 1


Entering distance b/n two points. Provide the coordinates.

First coordinates:
Enter x₁: 1
Enter y₁: 1

Second coordinates:
Enter x₂: 4
Enter y₂: 4

We are given: P(1,1) & Q (4,4)

    Formula -> D =  √((x₂ - x₁)²  +  (y₂ - y₁)²)


Step 1. Plug it in -> D = √((4 - 1)² + (4 + 1)²)

Step 2. We now have -> D = √(3² + 3²)

Step 3. Evaluate the squares -> D = √18

The result is D = 4.242640687119285
Commit count: 0

cargo fmt