GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - espmaniac/ParallelSeries: Calculator for resistors, capacitors, inductors.

BranchesTags
Open more actions menu

Latest commit

 

History

10 Commits
10 Commits

Folders and files

NameName
Last commit message
Last commit date
README.md
README.md
 
 
main.cpp
main.cpp
 
 
parallel_series.cpp
parallel_series.cpp
 
 
parallel_series.hpp
parallel_series.hpp
 
 

Repository files navigation

Web version repository

Github.io page

Calculator for calculating series or parallel or delta or mixed connections of resistors, capacitors, inductance coils.

Code Examples

Resistor Or Inductor

ParallelSeries resistor;

resistor.onSeries = [](double left, double right) -> double {
  return left + right;
};
resistor.onParallel = [](double left, double right) -> double {
  return (left != 0 && right != 0) ? (1 / (1/left + 1/right)) : 0;
};

// result 3
resistor.expr = "2 + 2 || 2"; // same as 2 + (2 || 2) 

/*"//" == "||" */
//resistor.expr = "2 // (2 + 2)"; // result 1.333

//resistor.expr = "((3 + (5 + 6)) // 4) + 1"; // 4.111111 

double r = resistor.solve();
printf("\nresistor = %f\n", r);

Capacitor

ParallelSeries capacitor;

capacitor.onSeries = [](double left, double right) -> double {
  return (left != 0 && right != 0) ? (1 / (1/left + 1/right)) : ((left > right) ? left : right);
};

capacitor.onParallel = [](double left, double right) -> double {
  return (left != 0 && right != 0) ? (left + right) : 0;
};

// result 1.3333
capacitor.expr = "2 + 2 // 2";

double c = capacitor.solve();

printf("\ncapacitor = %f\n", c);

Prefixes Support

something.expr = "2k + 2k || 2kilo"; // prefixes -> 2000 + 2000 || 2000

About

Calculator for resistors, capacitors, inductors.

Topics

calculatorcapacitance-calculatorcapacitorcapacitor-calculatorcapacitor-networkcapacity-calculatorequivalent-capacitanceequivalent-inductanceequivalent-resistanceinductance-calculatorinductorinductor-calculatorinductor-networkparallelresistance-calculatorresistorresistor-calculatorresistor-networkseries

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.