📄 point.h
字号:
/* $Id: point.h,v 1.4 2006-08-21 15:02:00 jonathan Exp $ * Jonathan Ledlie, Harvard University. * Copyright 2006. All rights reserved. */#ifndef POINT_H#define POINT_Hextern int DIMENSIONS;extern bool USE_HEIGHT;class Point { friend ostream& operator << (ostream& os, Point *p);public: double *v; double height; int stamp; Point (); Point (int stamp); Point (const Point *v); Point (const double *vec, double h); ~Point (); void clear (); void scale (double s); double length (); void bump (); void add (const Point *adjustment); bool isInInitialState (); void checkHeight (); double getAbsoluteDistance (const Point *b); double getEuclideanDistance (const Point *b); double getPlanarDistance (const Point *b); void assign (const Point *vec); Point* getDirection (const Point *p); bool operator<(const Point *rhs) const; bool operator<(int rhs); static Point* getRandomPoint (double sideLength); static Point* getRandomUnitVector (); void print (FILE *fp);};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -