Quaternion.fromTwoVectors constructor Null safety

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);