Browse Source

refactoring:vPunkt

main
fdai6887 2 years ago
parent
commit
bdc161ec7f
  1. BIN
      build/test/out/c/funktion.o
  2. BIN
      build/test/out/test_Akkortrichtsatz.out
  3. BIN
      build/test/out/test_Anlagenabnutzungsgrad.out
  4. BIN
      build/test/out/test_Anlagenintensitaet.out
  5. BIN
      build/test/out/test_Anlagenproduktivitaet.out
  6. BIN
      build/test/out/test_Arbeitsproduktivitaet.out
  7. BIN
      build/test/out/test_Cashflow_zu_Gesamtkapital.out
  8. BIN
      build/test/out/test_Dynamische_Amortisationszeit.out
  9. BIN
      build/test/out/test_Effektivverzinsung.out
  10. BIN
      build/test/out/test_Finanzierungsregeln.out
  11. BIN
      build/test/out/test_GewinnMaximum.out
  12. BIN
      build/test/out/test_Kalkulatorische_Zinsen.out
  13. BIN
      build/test/out/test_Kritische_Menge.out
  14. BIN
      build/test/out/test_Stueckzeitakkort.out
  15. BIN
      build/test/out/test_Vadd.out
  16. BIN
      build/test/out/test_Vaddx2.out
  17. BIN
      build/test/out/test_Vaddx3.out
  18. BIN
      build/test/out/test_Vangle.out
  19. BIN
      build/test/out/test_Vlength.out
  20. BIN
      build/test/out/test_Vmiddle.out
  21. BIN
      build/test/out/test_Vmiddle2.out
  22. BIN
      build/test/out/test_Vmiddle3.out
  23. BIN
      build/test/out/test_Vmultiplier.out
  24. BIN
      build/test/out/test_Vmultiplier2.out
  25. BIN
      build/test/out/test_Vmultiplier3.out
  26. BIN
      build/test/out/test_Vparallel.out
  27. BIN
      build/test/out/test_Vshift.out
  28. BIN
      build/test/out/test_Vskalort.out
  29. BIN
      build/test/out/test_Vsubstract.out
  30. BIN
      build/test/out/test_Vsubstract2.out
  31. BIN
      build/test/out/test_Vsubstract3.out
  32. BIN
      build/test/out/test_Zeitlohn.out
  33. BIN
      build/test/out/test_angebotserfolg.out
  34. BIN
      build/test/out/test_eigenkapital_Rentabilitaeten.out
  35. BIN
      build/test/out/test_erloesfunktion.out
  36. BIN
      build/test/out/test_gesamtkapital_Rentabilitaeten.out
  37. BIN
      build/test/out/test_grenzGewinn.out
  38. BIN
      build/test/out/test_marktanteil.out
  39. BIN
      build/test/out/test_trapezFlaeche.out
  40. BIN
      build/test/out/test_vPunkt.out
  41. 2
      build/test/results/test_Akkortrichtsatz.pass
  42. 2
      build/test/results/test_Anlagenabnutzungsgrad.pass
  43. 2
      build/test/results/test_Anlagenintensitaet.pass
  44. 2
      build/test/results/test_Anlagenproduktivitaet.pass
  45. 2
      build/test/results/test_Arbeitsproduktivitaet.pass
  46. 2
      build/test/results/test_Cashflow_zu_Gesamtkapital.pass
  47. 2
      build/test/results/test_Dynamische_Amortisationszeit.pass
  48. 2
      build/test/results/test_Effektivverzinsung.pass
  49. 2
      build/test/results/test_Finanzierungsregeln.pass
  50. 2
      build/test/results/test_GewinnMaximum.pass
  51. 2
      build/test/results/test_Kalkulatorische_Zinsen.pass
  52. 2
      build/test/results/test_Kritische_Menge.pass
  53. 2
      build/test/results/test_Stueckzeitakkort.pass
  54. 2
      build/test/results/test_Vadd.pass
  55. 2
      build/test/results/test_Vaddx2.pass
  56. 2
      build/test/results/test_Vaddx3.pass
  57. 2
      build/test/results/test_Vangle.pass
  58. 2
      build/test/results/test_Vlength.pass
  59. 2
      build/test/results/test_Vmiddle.pass
  60. 2
      build/test/results/test_Vmiddle2.pass
  61. 2
      build/test/results/test_Vmiddle3.pass
  62. 2
      build/test/results/test_Vmultiplier.pass
  63. 2
      build/test/results/test_Vmultiplier2.pass
  64. 2
      build/test/results/test_Vmultiplier3.pass
  65. 2
      build/test/results/test_Vparallel.pass
  66. 2
      build/test/results/test_Vshift.pass
  67. 2
      build/test/results/test_Vskalort.pass
  68. 2
      build/test/results/test_Vsubstract.pass
  69. 2
      build/test/results/test_Vsubstract2.pass
  70. 2
      build/test/results/test_Vsubstract3.pass
  71. 2
      build/test/results/test_Zeitlohn.pass
  72. 2
      build/test/results/test_angebotserfolg.pass
  73. 2
      build/test/results/test_eigenkapital_Rentabilitaeten.pass
  74. 2
      build/test/results/test_erloesfunktion.pass
  75. 2
      build/test/results/test_gesamtkapital_Rentabilitaeten.pass
  76. 2
      build/test/results/test_grenzGewinn.pass
  77. 2
      build/test/results/test_marktanteil.pass
  78. 2
      build/test/results/test_trapezFlaeche.pass
  79. 6
      build/test/results/test_vPunkt.pass
  80. 9
      src/funktion.c
  81. 16
      src/main.c

BIN
build/test/out/c/funktion.o

BIN
build/test/out/test_Akkortrichtsatz.out

BIN
build/test/out/test_Anlagenabnutzungsgrad.out

BIN
build/test/out/test_Anlagenintensitaet.out

BIN
build/test/out/test_Anlagenproduktivitaet.out

BIN
build/test/out/test_Arbeitsproduktivitaet.out

BIN
build/test/out/test_Cashflow_zu_Gesamtkapital.out

BIN
build/test/out/test_Dynamische_Amortisationszeit.out

BIN
build/test/out/test_Effektivverzinsung.out

BIN
build/test/out/test_Finanzierungsregeln.out

BIN
build/test/out/test_GewinnMaximum.out

BIN
build/test/out/test_Kalkulatorische_Zinsen.out

BIN
build/test/out/test_Kritische_Menge.out

BIN
build/test/out/test_Stueckzeitakkort.out

BIN
build/test/out/test_Vadd.out

BIN
build/test/out/test_Vaddx2.out

BIN
build/test/out/test_Vaddx3.out

BIN
build/test/out/test_Vangle.out

BIN
build/test/out/test_Vlength.out

BIN
build/test/out/test_Vmiddle.out

BIN
build/test/out/test_Vmiddle2.out

BIN
build/test/out/test_Vmiddle3.out

BIN
build/test/out/test_Vmultiplier.out

BIN
build/test/out/test_Vmultiplier2.out

BIN
build/test/out/test_Vmultiplier3.out

BIN
build/test/out/test_Vparallel.out

BIN
build/test/out/test_Vshift.out

BIN
build/test/out/test_Vskalort.out

BIN
build/test/out/test_Vsubstract.out

BIN
build/test/out/test_Vsubstract2.out

BIN
build/test/out/test_Vsubstract3.out

BIN
build/test/out/test_Zeitlohn.out

BIN
build/test/out/test_angebotserfolg.out

BIN
build/test/out/test_eigenkapital_Rentabilitaeten.out

BIN
build/test/out/test_erloesfunktion.out

BIN
build/test/out/test_gesamtkapital_Rentabilitaeten.out

BIN
build/test/out/test_grenzGewinn.out

BIN
build/test/out/test_marktanteil.out

BIN
build/test/out/test_trapezFlaeche.out

BIN
build/test/out/test_vPunkt.out

2
build/test/results/test_Akkortrichtsatz.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss 552.000000 - Testergebniss 552.000000
:time: 0.004043380000439356
:time: 0.001220079000631813

2
build/test/results/test_Anlagenabnutzungsgrad.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss 60.000000 - Testergebniss 60.000000
:time: 0.0038506429991684854
:time: 0.002810395999404136

2
build/test/results/test_Anlagenintensitaet.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss 4878.048780 - Testergebniss 4878.048780
:time: 0.008283400999061996
:time: 0.005146170000443817

2
build/test/results/test_Anlagenproduktivitaet.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss 18.203304 - Testergebniss 18.203304
:time: 0.0021181489992159186
:time: 0.006841850001364946

2
build/test/results/test_Arbeitsproduktivitaet.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss 60.000000 - Testergebniss 60.000000
:time: 0.0017539679993205937
:time: 0.0055682720012555365

2
build/test/results/test_Cashflow_zu_Gesamtkapital.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss 0.158038 - Testergebniss 0.158038
:time: 0.0024564220002503134
:time: 0.00463684500027739

2
build/test/results/test_Dynamische_Amortisationszeit.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss 189.421906 - Testergebniss 189.421906
:time: 0.0016407889997935854
:time: 0.003217641000446747

2
build/test/results/test_Effektivverzinsung.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss 16.034390 - Testergebniss 16.034390
:time: 0.002413800000795163
:time: 0.00326192500142497

2
build/test/results/test_Finanzierungsregeln.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss 0.051041 - Testergebniss 0.051041
:time: 0.0031261450003512437
:time: 0.0015489529996557394

2
build/test/results/test_GewinnMaximum.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss 251.000000 - Testergebniss 251.000000
:time: 0.002019076999204117
:time: 0.0014673379992018454

2
build/test/results/test_Kalkulatorische_Zinsen.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss 1.440000 - Testergebniss 1.440000
:time: 0.002029960000072606
:time: 0.0013913610000599874

2
build/test/results/test_Kritische_Menge.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss -12.096026 - Testergebniss -12.096026
:time: 0.0021258029992168304
:time: 0.0021195179997448577

2
build/test/results/test_Stueckzeitakkort.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- '96600.000000' - '96600.000000'
:time: 0.001731338999888976
:time: 0.0068494769984681625

2
build/test/results/test_Vadd.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0016733970005589072
:time: 0.0032821090007928433

2
build/test/results/test_Vaddx2.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.002708939999138238
:time: 0.002167870999983279

2
build/test/results/test_Vaddx3.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0022359079994203057
:time: 0.0025919859999703476

2
build/test/results/test_Vangle.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0023873749996710103
:time: 0.0023873529989941744

2
build/test/results/test_Vlength.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0021646899986080825
:time: 0.0019459030008874834

2
build/test/results/test_Vmiddle.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.002437608000036562
:time: 0.009410880998984794

2
build/test/results/test_Vmiddle2.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.001884641998913139
:time: 0.002128293999703601

2
build/test/results/test_Vmiddle3.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0018807079995895037
:time: 0.00201268499949947

2
build/test/results/test_Vmultiplier.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0015556889993604273
:time: 0.0017390409993822686

2
build/test/results/test_Vmultiplier2.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.00185922600030608
:time: 0.0017444910008634906

2
build/test/results/test_Vmultiplier3.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0017482869989180472
:time: 0.00751055799992173

2
build/test/results/test_Vparallel.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0037896190005994868
:time: 0.004626278001524042

2
build/test/results/test_Vshift.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0022176940001372714
:time: 0.0021990349996485747

2
build/test/results/test_Vskalort.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0017369569995935308
:time: 0.0019299809991935035

2
build/test/results/test_Vsubstract.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0013082570003462024
:time: 0.005269362000035471

2
build/test/results/test_Vsubstract2.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.001740650999636273
:time: 0.0020222269995429087

2
build/test/results/test_Vsubstract3.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0042333060009696055
:time: 0.0016669340002408717

2
build/test/results/test_Zeitlohn.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss 3450.000000 - Testergebniss 3450.000000
:time: 0.0021997940002620453
:time: 0.004036337000798085

2
build/test/results/test_angebotserfolg.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss 225.000000 - Testergebniss 225.000000
:time: 0.0038179349994607037
:time: 0.0017897920006362256

2
build/test/results/test_eigenkapital_Rentabilitaeten.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss 62.500000 - Testergebniss 62.500000
:time: 0.002843555999788805
:time: 0.0018482769992260728

2
build/test/results/test_erloesfunktion.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss 4000.000000 - Testergebniss 4000.000000
:time: 0.0024632050008221995
:time: 0.0034350049991189735

2
build/test/results/test_gesamtkapital_Rentabilitaeten.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss 27.136929 - Testergebniss 27.136929
:time: 0.009073387000171351
:time: 0.0032572059990343405

2
build/test/results/test_grenzGewinn.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss 1141.000000 - Testergebniss 1141.000000
:time: 0.001832195999668329
:time: 0.0013038270008109976

2
build/test/results/test_marktanteil.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Testergebniss 21.739130 - Testergebniss 21.739130
:time: 0.003932005998649402
:time: 0.005212906000451767

2
build/test/results/test_trapezFlaeche.pass

@ -17,4 +17,4 @@
:stdout: :stdout:
- 'Flaeche vom Trapez beträgt: 21.000000' - 'Flaeche vom Trapez beträgt: 21.000000'
- Testergebniss 21.000000 - Testergebniss 21.000000
:time: 0.0016338409986929037
:time: 0.0028995390002819477

6
build/test/results/test_vPunkt.pass

@ -14,7 +14,5 @@
:passed: 1 :passed: 1
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout:
- Punkt liegt nicht auf Vektor
- ''
:time: 0.0015602870007569436
:stdout: []
:time: 0.00648136600102589

9
src/funktion.c

@ -236,16 +236,15 @@ double Vangle(float x1, float x2, float x3, float z1, float z2, float z3) {
return 11; return 11;
} }
float vPunkt(float x1, float x2, float x3, float z1, float z2, float z3, float p1, float p2, float p3) { float vPunkt(float x1, float x2, float x3, float z1, float z2, float z3, float p1, float p2, float p3) {
double result;
float e1 = (p1 - x1) / z1; float e1 = (p1 - x1) / z1;
float e2 = (p2 - x2) / z2; float e2 = (p2 - x2) / z2;
float e3 = (p3 - x3) / z3; float e3 = (p3 - x3) / z3;
if (e1 == e2 && e2 == e3) { if (e1 == e2 && e2 == e3) {
printf("Punkt liegt auf Vektor\n\n");
return 1;
result = 1;
} else { } else {
printf("Punkt liegt nicht auf Vektor\n\n");
return 0;
result = 0;
} }
return 0;
return result;
} }

16
src/main.c

@ -6,7 +6,7 @@
int main() int main()
{ {
double a,b,c,d,h,x1,s1,x2,x3,z1,z2,z3,m;
double a,b,c,d,h,x1,s1,x2,x3,z1,z2,z3,p1,p2,p3,m;
a = getValue('a'); a = getValue('a');
b = getValue('b'); b = getValue('b');
h = getValue('h'); h = getValue('h');
@ -183,30 +183,16 @@ int main()
z3 = getValue('Z'); z3 = getValue('Z');
Vangle(x1,x2,x3,z1,z2,z3); Vangle(x1,x2,x3,z1,z2,z3);
printf("Stuetzvektor\n");
printf("1. Vektor\n");
printf("x eingeben");
x1 = getValue('X'); x1 = getValue('X');
printf("y eingeben ");
x2 = getValue('X'); x2 = getValue('X');
printf("z eingeben");
x3 = getValue('X'); x3 = getValue('X');
printf("2. Vektor\n");
printf("a eingeben");
z1 = getValue('Z'); z1 = getValue('Z');
printf("b eingeben ");
z2 = getValue('Z'); z2 = getValue('Z');
printf("c eingeben");
z3 = getValue('Z'); z3 = getValue('Z');
printf("Punkt\n");
printf("2. Vektor\n");
printf("P1 eingeben");
p1 = getValue('P'); p1 = getValue('P');
printf("P2 eingeben ");
p2 = getValue('P'); p2 = getValue('P');
printf("P3 eingeben");
p3 = getValue('P'); p3 = getValue('P');
vPunkt(x1,x2,x3,z1,z2,z3,p1,p2,p3); vPunkt(x1,x2,x3,z1,z2,z3,p1,p2,p3);
} }
Loading…
Cancel
Save