Crates.io | eletric_calc |
lib.rs | eletric_calc |
version | 0.1.1 |
source | src |
created_at | 2024-03-12 03:27:39.098 |
updated_at | 2024-03-13 00:13:00.697559 |
description | Calculator for Ohm's law. |
homepage | |
repository | |
max_upload_size | |
id | 1170070 |
size | 18,943 |
eletric_calc is a calculator for Ohm's law.
You can calculate Watts, Amps, Ohms, and Volts.
P = Watts, I = Amps, R = Ohms, V = Volts.
operation_type
: Accepted values P, I, R, V.unknown_1
: Accepted values P, I, R, V.unknown_2
: Accepted values P, I, R, V.value_unknown_1
: Accepted Float.value_unknown_2
: Accepted Float.To calculate Volts, you will provide two other values which can be I, R, or P.
use eletric_calc::EletricCalc;
let eletric_calc: <String, io::Error> = EletricCalc{
operation_type: String::from("V"),
unknown_1: String::from("R"),
unknown_2: String::from("P"),
value_unknown_1: 2.0,
value_unknown_2: 2.0
}.calc();
2V
Add this to your Cargo.toml:
[dependencies]
eletric_calc = "0.1.0"
This project is licensed under the MIT License - see the LICENSE file for details.