mirror of
https://github.com/worldforge/worldforge
synced 2026-08-17 16:26:05 -04:00
50 lines
1.3 KiB
C++
50 lines
1.3 KiB
C++
// vector_test.cpp (Vector<> test functions)
|
|
//
|
|
// The WorldForge Project
|
|
// Copyright (C) 2001 The WorldForge Project
|
|
//
|
|
// This program is free software; you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation; either version 2 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with this program; if not, write to the Free Software
|
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
//
|
|
// For information about WorldForge and its authors, please contact
|
|
// the Worldforge Web Site at http://www.worldforge.org.
|
|
|
|
// Author: Alistair Riddoch
|
|
// Created: 2011-01-26
|
|
|
|
#ifdef NDEBUG
|
|
#undef NDEBUG
|
|
#endif
|
|
#ifndef DEBUG
|
|
#define DEBUG
|
|
#endif
|
|
|
|
#include "wfmath/ball.h"
|
|
|
|
#include <cassert>
|
|
|
|
using namespace WFMath;
|
|
|
|
int main()
|
|
{
|
|
Ball<2> b1(Point<2>(0,0), 1);
|
|
|
|
assert(b1.isValid());
|
|
|
|
Ball<2> b2(Point<2>(0,0), -1);
|
|
|
|
assert(!b2.isValid());
|
|
|
|
return 0;
|
|
}
|