// MMath.ToQuadrant(double) /// <summary> /// Liefert den Quadranten zum Winkel. /// </summary> /// <param name="value">Winkel in Bogenmaß.</param> /// <returns>Quadrant zum Winkel.</returns> public static EQuadrant ToQuadrant(double value) { // Quadrant bestimmen und liefern double rtn = MMath.Mod(value, MMath.Pi2); if (MMath.Sgn(rtn) == -1.0) { rtn += MMath.Pi2; } return((EQuadrant)(int)MMath.Ceil(rtn / MMath.Rad090)); }
// MMath.Mod(int, int) /// <summary> /// Liefert den ganzzahligen Restwert der Division. /// </summary> /// <param name="x">Dividend.</param> /// <param name="y">Divisor.</param> /// <returns>Ganzzahliger Restwert der Division.</returns> public static int Mod(int x, int y) { // Rückgabe return((int)MMath.Mod((double)x, (double)y)); }
// MMath.Div(double) /// <summary> /// Liefert den Dezimalteil der Dezimalzahl. /// </summary> /// <param name="value">Dezimalzahl</param> /// <returns>Dezimalteil der Dezimalzahl.</returns> public static double Div(double value) { // Rückgabe return(MMath.Mod(value, 1.0)); }