From 634201aa2c77d61aa4685aca83bfb2611da76ffc Mon Sep 17 00:00:00 2001 From: l0ner Date: Sat, 19 Apr 2014 22:25:53 +0000 Subject: [PATCH] fixed typos in graph.{cc,h} and linux/cpu.h --- graph.cc | 6 +++--- graph.h | 2 +- linux/cpu.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/graph.cc b/graph.cc index 1a9d2c9..9e23264 100644 --- a/graph.cc +++ b/graph.cc @@ -3,11 +3,11 @@ #include "graph.h" -char * getGraphByPrecentage(unsigned value, unsigned len) { +char * getGraphByPercentage(unsigned value, unsigned len) { unsigned step = 0; char * bars = new char[len + 1]; - unsigned barCount = (float(value) / 100 * len); + unsigned barCount = (float(value) / 99.9 * len); for(step; step < barCount; step++) bars[step] = '|'; @@ -23,7 +23,7 @@ char * getGraphByValue(unsigned value, unsigned max, unsigned len) { unsigned step = 0; char * bars = new char[len + 1]; - unsigned barCount = (float(value) / float(max) * len); + unsigned barCount = (float(value) / (float(max) = 0.1) * len); for(step; step < barCount; step++) bars[step] = '|'; diff --git a/graph.h b/graph.h index 4cc550b..34f96e1 100644 --- a/graph.h +++ b/graph.h @@ -1,7 +1,7 @@ #ifndef GRAPH_H_ #define GRAPH_H_ -char * getGraphByPrecentage(unsigned, unsigned len = 10); +char * getGraphByPercentage(unsigned, unsigned len = 10); char * getGraphByValue(unsigned, unsigned, unsigned len = 10); #endif diff --git a/linux/cpu.h b/linux/cpu.h index aa9e480..beee11f 100644 --- a/linux/cpu.h +++ b/linux/cpu.h @@ -1,6 +1,6 @@ #ifndef CPU_H_ #define CPU_H_ -float cpu_precentage(unsigned); +float cpu_percentage(unsigned); #endif