Update 0.2.6
This commit is contained in:
parent
58eec7ed22
commit
3a0cb7078c
11 changed files with 95 additions and 61 deletions
|
|
@ -3,7 +3,7 @@
|
|||
#include <math.h>
|
||||
#include "../utils/logger.h"
|
||||
|
||||
#include "math.h"
|
||||
#include "math_ext.h"
|
||||
|
||||
double Add(double x, double y){
|
||||
return(x + y);
|
||||
|
|
@ -21,4 +21,12 @@ double Div(double x, double y){
|
|||
return 0.0;
|
||||
else
|
||||
return(x / y);
|
||||
}
|
||||
|
||||
double CubeVolume(double a){
|
||||
return pow(a, 3);
|
||||
}
|
||||
|
||||
double SphereVolume(double r){
|
||||
return (4/3*M_PI*pow(r, 3));
|
||||
}
|
||||
|
|
@ -1,9 +1,12 @@
|
|||
#ifndef _MATH_H_
|
||||
#define _MATH_H_
|
||||
#ifndef _MATH_EXT_H_
|
||||
#define _MATH_EXT_H_
|
||||
|
||||
double Add(double x, double y);
|
||||
double Sub(double x, double y);
|
||||
double Mul(double x, double y);
|
||||
double Div(double x, double y);
|
||||
|
||||
double CubeVolume(double a);
|
||||
double SphereVolume(double r);
|
||||
|
||||
#endif
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
<<<<<<< HEAD
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
|
@ -37,43 +36,3 @@ void yourReality(){
|
|||
p("\033[0m");
|
||||
printf("\e[?25h");
|
||||
}
|
||||
=======
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "your-reality.h"
|
||||
|
||||
//Lyrics from "Your Reality" by Dan Salvato
|
||||
|
||||
//fs -> flush & sleep
|
||||
void fs(int milliseconds){
|
||||
fflush(stdout);
|
||||
usleep(milliseconds*1000);
|
||||
}
|
||||
|
||||
//p -> printf
|
||||
void p(char* txt){
|
||||
printf(txt);
|
||||
}
|
||||
|
||||
void yourReality(){
|
||||
|
||||
printf("\e[?25l");
|
||||
p("Loading ");
|
||||
for(int i = 0; i < 2; i++){
|
||||
//\033[XC => X columns right
|
||||
//\033[XD => X columns left
|
||||
printf("\033[3D "); printf("\033[3D");
|
||||
fs(500); printf("."); fs(500); printf("."); fs(500); printf("."); fs(500);
|
||||
|
||||
}
|
||||
printf("\n");
|
||||
printf("\033[0;33mEvery "); fs(350); printf("day, ");
|
||||
fs(700);
|
||||
p("I "); fs(450); p("imagine "); fs(350); p("a "); fs(350); p("future "); fs(350); p("where "); fs(750);
|
||||
p("i "); fs(300); p("can "); fs(300); p("be "); fs(300); p("with "); fs(300); p("you.");
|
||||
|
||||
p("\033[0m");
|
||||
printf("\e[?25h");
|
||||
}
|
||||
>>>>>>> f1cf6269f94065bfb8498dd7ef06bfbb61442b80
|
||||
|
|
|
|||
|
|
@ -1,14 +1,6 @@
|
|||
<<<<<<< HEAD
|
||||
#ifndef _YOUR_REALITY_H
|
||||
#define _YOUR_REALITY_H
|
||||
|
||||
void yourReality();
|
||||
|
||||
=======
|
||||
#ifndef _YOUR_REALITY_H
|
||||
#define _YOUR_REALITY_H
|
||||
|
||||
void yourReality();
|
||||
|
||||
>>>>>>> f1cf6269f94065bfb8498dd7ef06bfbb61442b80
|
||||
#endif
|
||||
Reference in a new issue