# Edit of asset "Extra Math for GDScript" Accepted

Property Old/Current New/Edit
Title Extra Math for GDScript
Description Provides easy-to-use math functions that are not yet available in the stable engine builds. Functionality includes Euler conversions, conversion to axis-angle vector, and more. If you would like to add a common math function please submit an issue on GitHub.

Usage example:
```
var from = Vector3.FORWARD
var to = Vector3(1, 0, 1)
var rot = ExtraMath.get_vectors_rotation(from, to)
var to_calculated = from.rotated(rot.normalized(), rot.length())
var to_calculated_with_basis = Basis(rot.normalized(), rot.length()) * from
```

Functions in current version:
usec_to_sec(usec: int)
sec_to_usec(sec: float)
get_vectors_rotation(from: Vector3, to: Vector3)
basis2axis_angle(b: Basis)
quat2axis_angle(q: Quat)
quat2euler(q: Quat, order = DEFAULT_EULER_ORDER)
basis2euler(b: Basis, order = DEFAULT_EULER_ORDER)
euler2quat(angles: Vector3, order = DEFAULT_EULER_ORDER)
euler2basis(angles: Vector3, order = DEFAULT_EULER_ORDER)

Constants in current version:
const EPSILON = 0.00001
const EPSILON2 = (EPSILON * EPSILON)
const SQRTHALF = 0.7071067811865475244008443621048490
const SQRT2 = 1.4142135623730950488016887242
const LN2 = 0.6931471805599453094172321215
const EULER = 2.7182818284590452353602874714
const DEFAULT_EULER_ORDER = "yxz"

For more details see the comments in the code.
Provides easy-to-use math functions that are not yet available in the stable engine builds. Functionality includes Euler conversions, conversion to axis-angle vector, and more. If you would like to add a common math function please submit an issue on GitHub.

Usage example:
```
var from = Vector3.FORWARD
var to = Vector3(1, 0, 1)
var rot = ExtraMath.get_vectors_rotation(from, to)
var to_calculated = from.rotated(rot.normalized(), rot.length())
var to_calculated_with_basis = Basis(rot.normalized(), rot.length()) * from
```

Functions in current version:
usec_to_sec(usec: int)
sec_to_usec(sec: float)
get_vectors_rotation(from: Vector3, to: Vector3)
basis2axis_angle(b: Basis)
quat2axis_angle(q: Quat)
quat2euler(q: Quat, order = DEFAULT_EULER_ORDER)
basis2euler(b: Basis, order = DEFAULT_EULER_ORDER)
euler2quat(angles: Vector3, order = DEFAULT_EULER_ORDER)
euler2basis(angles: Vector3, order = DEFAULT_EULER_ORDER)

Constants in current version:
const EPSILON = 0.00001
const EPSILON2 = (EPSILON * EPSILON)
const SQRTHALF = 0.7071067811865475244008443621048490
const SQRT2 = 1.4142135623730950488016887242
const LN2 = 0.6931471805599453094172321215
const EULER = 2.7182818284590452353602874714
const DEFAULT_EULER_ORDER = "yxz"

For more details see the comments in the code.
Category Scripts 