Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string kampania(NapBon x1, NapBon y1, NapBon x2, NapBon y2){
- a = (x2 - y2) / (x1 - y1); //
- b = ((x1 * y2) - (x2 * y1)) / (x1 - y1); // bledne
- NapBon a;
- NapBon b;
- a.x = (x2.x - y2.x) / (x1.x - y1.x);
- b.x = ((x1.x * y2.x) - (x2.x * y1.x)) / (x1.x - y1.x);
- double tmp = a * 100.0 + 0.5; //
- a = floor(tmp) / 100.0; // bledne
- NapBon tmp;
- tmp.x = a.x * 100.0 + 0.5;
- a.x = floor(tmp.x) / 100.0;
Add Comment
Please, Sign In to add comment