Skip to content

biswas445/advanced-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advanced Black & White Calculator

A sleek, modern calculator with enhanced visual effects and intuitive functionality, featuring a monochromatic black and white design with interactive cursor animations.

Features

  • Enhanced Visual Design: Clean black and white interface with subtle animations
  • Interactive Cursor: Dynamic cursor with different states (default, hover, click, calculator)
  • Scientific Functions: Comprehensive set of scientific calculations
  • Memory Functions: Basic memory operations (M+, M-, MR, MC)
  • History Panel: Track and reuse previous calculations
  • Keyboard Support: Full keyboard navigation and shortcuts
  • Responsive Design: Works on all device sizes
  • Error Handling: Robust error management for invalid operations

Keyboard Shortcuts

  • 0-9 : Number input
  • +, -, *, / : Basic operations
  • Enter or = : Calculate result
  • Escape : All Clear (AC)
  • Backspace : Delete last digit
  • Ctrl+H : Toggle history panel
  • Ctrl+P : Pi (π)
  • Ctrl+E : Euler's number (e)
  • Ctrl+S : Sine function
  • Ctrl+C : Cosine function
  • Ctrl+T : Tangent function
  • Ctrl+L : Logarithm
  • Ctrl+Q : Square root
  • Ctrl+R : Reciprocal (1/x)
  • Ctrl+N : Sign change (+/-)
  • Ctrl+A : All Clear
  • Ctrl+F : Square (x²)
  • Ctrl+G : Cube (x³)

Installation

  1. Clone or download this repository to your local machine
  2. Open index.html in your web browser
  3. The calculator is ready to use!

File Structure

calculator/
├── index.html              # Main HTML file
├── README.md              # This file
├── sw.js                  # Service worker for offline functionality
├── css/
│   ├── style.css          # Main styling
│   ├── animations.css     # Animation effects
│   └── responsive.css     # Responsive design
└── js/
    ├── calculator.js      # Core calculator logic
    ├── ui.js              # User interface interactions
    ├── cursor.js          # Interactive cursor functionality
    ├── animations.js      # Visual effects
    └── main.js            # Application initialization

Functionality

Basic Operations

  • Addition, subtraction, multiplication, division
  • Percentage calculations
  • Decimal point support

Scientific Functions

  • Trigonometric functions (sin, cos, tan)
  • Inverse trigonometric functions (asin, acos, atan)
  • Hyperbolic functions (sinh, cosh, tanh)
  • Logarithmic functions (log, ln, log₂, logᵧ)
  • Exponential functions (eˣ, 10ˣ, 2ˣ)
  • Square and cube functions
  • Square root and cube root
  • Power functions (x², x³, xʸ)
  • Factorial calculations
  • Constants (π, e)

Memory Functions

  • MC: Memory Clear
  • MR: Memory Recall
  • M+: Memory Add
  • M-: Memory Subtract
  • MS: Memory Store
  • MRC: Memory Register Clear

Customization

The calculator uses a black and white color scheme by default. You can modify the color variables in css/style.css to customize the appearance while maintaining the monochromatic theme.

Browser Support

The calculator works in all modern browsers that support:

  • ES6 JavaScript features
  • CSS Grid and Flexbox
  • CSS Variables
  • Modern DOM APIs

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Commit your changes (git commit -m 'Add amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

License

This project is open source and available under the MIT License.

Support

If you encounter any issues or have questions, please file an issue in the GitHub repository.

About

Advanced Calculator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors