Quaternion.fromTwoVectors constructor

Quaternion.fromTwoVectors(
  1. Vector3 a,
  2. Vector3 b
)

Constructs a quaternion to be the rotation that rotates vector a to b.

Implementation

factory Quaternion.fromTwoVectors(Vector3 a, Vector3 b) =>
    Quaternion._()..setFromTwoVectors(a, b);