v0.1.0: 初始工程骨架 — 7模块 40头文件 32源文件 17文档 Apache-2.0
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "vde/core/distance.h"
|
||||
|
||||
using namespace vde::core;
|
||||
|
||||
TEST(DistanceTest, PointToPoint) {
|
||||
EXPECT_DOUBLE_EQ(distance(Point3D(0,0,0), Point3D(1,0,0)), 1.0);
|
||||
}
|
||||
|
||||
TEST(DistanceTest, PointToPlane) {
|
||||
Plane3D plane(Point3D(0,0,0), Vector3D(0,0,1));
|
||||
EXPECT_DOUBLE_EQ(distance(Point3D(0,0,5), plane), 5.0);
|
||||
}
|
||||
Reference in New Issue
Block a user