|
static int | absmod (int a, int b) |
|
static QString | angleToString (double a) |
| Converts the given angle in rad to the given angle format. More...
|
|
static bool | containsFuzzy (const QList< double > &values, double v, double tol=RS::PointTolerance) |
|
static double | deg2rad (double a) |
| Converts degrees to radians. More...
|
|
static double | eval (const QString &expression, bool *ok=NULL) |
| Evaluates the given mathematical expression and returns the result. More...
|
|
static bool | fuzzyAngleCompare (double v1, double v2, double tolerance=RS::AngleTolerance) |
|
static bool | fuzzyCompare (double v1, double v2, double tolerance=RS::PointTolerance) |
|
static double | getAngleDifference (double a1, double a2) |
|
static double | getAngleDifference180 (double a1, double a2) |
|
static void | getBiQuadRoots (double p[], double r[][5]) |
|
static void | getCubicRoots (double p[], double r[][5]) |
|
static QString | getError () |
|
static int | getGcd (int a, int b) |
| Finds greatest common divider using Euclid's algorithm. More...
|
|
static double | getNormalizedAngle (double a) |
| Gets the normalized angle from a . More...
|
|
static void | getQuadRoots (double p[], double r[][5]) |
|
static double | getRelativeAngle (double a, double baseAngle) |
|
static double | gra2deg (double a) |
| Converts grads to degrees. More...
|
|
static bool | hasError () |
|
static void | init () |
|
static bool | isAngleBetween (double a, double a1, double a2, bool reversed) |
| Tests if angle a is between a1 and a2. More...
|
|
static bool | isAngleReadable (double angle, double tolerance=0.01) |
|
static bool | isBetween (double value, double limit1, double limit2, bool inclusive, double tolerance=RS::PointTolerance) |
|
static bool | isInf (double v) |
|
static bool | isNaN (double v) |
|
static bool | isNormal (double v) |
|
static bool | isSameDirection (double dir1, double dir2, double tol=RS::AngleTolerance) |
| Tests if two angels point approximately in the same direction. More...
|
|
static bool | isSane (double v) |
|
static double | makeAngleReadable (double angle, bool readable=true, bool *corrected=NULL) |
| Adds 180° to the given angle if a text constructed with that angle otherwise wouldn't be readable. More...
|
|
static int | mround (double v) |
| Rounds the given double to the next int. More...
|
|
static RVector | parseCoordinate (const QString &coordinateString, const RVector &relativeZero=RVector::nullVector) |
| Parses the given string as coordinate. More...
|
|
static double | parseScale (const QString &scaleString) |
|
static double | pow (double x, double y) |
| Safe pow function. More...
|
|
static double | rad2deg (double a) |
| Converts radians to degrees. More...
|
|
static double | rad2gra (double a) |
| Converts radians to gradians. More...
|
|
static void | simplify (int numerator, int denominator, int &numeratorRes, int &denominatorRes) |
|
template<class T > |
static void | swap (T &a, T &b) |
| Swaps two given values. More...
|
|
static void | toFraction (double v, int maxDenominator, int &number, int &numerator, int &denominator) |
|
static QString | toFractionString (double v, int maxDenominator) |
|
static QString | trimTrailingZeroes (const QString &s) |
|
static double | trunc (double v) |
|
static void | uninit () |
|
QString RMath::lastError = "" |
|
staticprivate |
Copyright (c) 2011-2018 by Andrew Mustun.
All rights reserved.
This file is part of the QCAD project.
QCAD 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 3 of the License, or (at your option) any later version.
QCAD 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 QCAD. Last error encountered.