kig
coordinate_system.cpp File Reference
#include "coordinate_system.h"
#include "../kig/kig_document.h"
#include "../kig/kig_view.h"
#include "common.h"
#include "coordinate.h"
#include "goniometry.h"
#include "kigpainter.h"
#include <qpainter.h>
#include <qregexp.h>
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
#include <knumvalidator.h>
#include <string>
#include <math.h>

Go to the source code of this file.
Functions | |
| static double | nicenum (double x, bool round) |
| static QString | withoutSpaces (const QString &str) |
Variables | |
| static const char | euclideanTypeString [] = "Euclidean" |
| static const char | polarTypeString [] = "Polar" |
Function Documentation
| static double nicenum | ( | double | x, | |
| bool | round | |||
| ) | [static] |
copied and adapted from a ( public domain ) function i found in the first Graphics Gems book.
Credits to Paul S. Heckbert, who wrote the "Nice number for graph labels" gem. find a "nice" number approximately equal to x. We look for 1, 2 or 5, multiplied by a power of 10.
Definition at line 191 of file coordinate_system.cpp.
This file is part of Kig, a KDE program for Interactive Geometry.
.. Copyright (C) 2002 Dominique Devriese <devriese@kde.org>
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
Definition at line 42 of file coordinate_system.cpp.
Variable Documentation
const char euclideanTypeString[] = "Euclidean" [static] |
Definition at line 548 of file coordinate_system.cpp.
const char polarTypeString[] = "Polar" [static] |
Definition at line 549 of file coordinate_system.cpp.
KDE 4.2 API Reference