com.aspose.threed

Interfaces

Classes

Enums

Exceptions

com.aspose.threed

Class MathUtils



  • public class MathUtils
    extends Object
    A set of useful mathematical utilities.
    • Method Detail

      • clamp

        public static double clamp(double val,
                                   double min,
                                   double max)
        Clamp value to range [min, max]
        Parameters:
        val - Value to clamp.
        min - Minimum value.
        max - Maximum value.
        Returns:
        The value between [min, max]
      • toDegree

        public static Vector3 toDegree(Vector3 radian)
        Convert a Vector3 from radian to degree.
        Parameters:
        radian - The radian value.
        Returns:
        The degree value.
      • toRadian

        public static Vector3 toRadian(Vector3 degree)
        Convert a Vector3 from degree to radian
        Parameters:
        degree - The degree value.
        Returns:
        The radian value.
      • toDegree

        public static float toDegree(float radian)
        Convert a number from radian to degree
        Parameters:
        radian - The radian value.
        Returns:
        The degree value.
      • toDegree

        public static double toDegree(double radian)
        Convert a number from radian to degree
        Parameters:
        radian - The radian value.
        Returns:
        The degree value.
      • toDegree

        public static Vector3 toDegree(double x,
                                       double y,
                                       double z)
        Convert a number from radian to degree
        Parameters:
        x - The x component in radian value.
        y - The y component in radian value.
        z - The z component in radian value.
        Returns:
        The degree value.
      • toRadian

        public static float toRadian(float degree)
        Convert a number from degree to radian
        Parameters:
        degree - The degree value.
        Returns:
        The radian value.
      • toRadian

        public static double toRadian(double degree)
        Convert a number from degree to radian
        Parameters:
        degree - The degree value.
        Returns:
        The radian value.
      • toRadian

        public static Vector3 toRadian(double x,
                                       double y,
                                       double z)
        Convert a vector from degree to radian
        Parameters:
        x - The x component in degree value.
        y - The y component in degree value.
        z - The z component in degree value.
        Returns:
        The radian value.