fixed typos in graph.{cc,h} and linux/cpu.h

This commit is contained in:
l0ner 2014-04-19 22:25:53 +00:00
parent 03040e64f2
commit 634201aa2c
3 changed files with 5 additions and 5 deletions

@ -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] = '|';

@ -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

@ -1,6 +1,6 @@
#ifndef CPU_H_
#define CPU_H_
float cpu_precentage(unsigned);
float cpu_percentage(unsigned);
#endif