https://github.com/olehkavetskyi/square-calculator-app
https://github.com/olehkavetskyi/square-calculator-app
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/olehkavetskyi/square-calculator-app
- Owner: olehkavetskyi
- Created: 2023-07-09T19:50:26.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-09T19:59:43.000Z (almost 2 years ago)
- Last Synced: 2025-02-03T23:41:25.156Z (4 months ago)
- Language: TypeScript
- Size: 149 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Square Calculator App
The Square Calculator app is a simple web application that allows users to input the coordinates of a square (ABCD) and a point O, and calculates whether the input forms a valid square. It also determines if the point O is the center of the square.

## Features
- Input fields for coordinates: The app provides input fields to enter the x and y coordinates of the square vertices (A, B, C, D) and the point O.
- Calculation: Upon submitting the form, the app calculates whether the input coordinates form a valid square and determines if the point O is the center of the square.
- Visual representation: The app displays a canvas where it draws the square and point O based on the input coordinates. The square is filled with light blue color, and the vertices are marked with red dots. If the point O is the center, it is marked with a green dot; otherwise, it is marked with a yellow dot.## Usage
1. Enter the x and y coordinates of points A, B, C, D, and O in the input fields.
2. Click the "Calculate" button to perform the calculations.
3. The app will display the result and additional information below the form.
4. The canvas will show a visual representation of the square and point O.## Technologies Used
- Angular: The app is built using the Angular framework.
- HTML5 Canvas: The canvas element is utilized to draw the square and point O.## Development
To run the Square Calculator app locally and make modifications:
1. Clone the repository: `git clone https://github.com/olehkavetskyi/Square-Calculator-App)`
2. Install the dependencies: `npm install`
3. Start the development server: `ng serve`
4. Open the app in your browser: `http://localhost:4200`Feel free to explore the code and make any necessary changes to suit your requirements.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
Executed tests:
