You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
351 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. #include "GMath.h"
  2. int main() {
  3. GLine l(GPoint3(0.0f, 0.0f, 0.0f), GVector3(1.0f, 0.0f, 0.0f));
  4. GPoint3 q(0.0f, 0.0f, 1.0f);
  5. float d = dist(q, l);
  6. cout << d << endl;
  7. bool b = l.IsOnLine(GPoint3(0.0f, 0.0f, 0.0f));
  8. bool b2 = l.IsOnLine(GPoint3(0.5f, 0.0f, 0.0f));
  9. bool b3 = l.IsOnLine(GPoint3(0.5f, 0.5f, 0.0f));
  10. return 0;
  11. }