Created
October 28, 2022 17:43
-
-
Save NicholasSterling/d1e6ef7fd7c32295a2e8dd16e4187f42 to your computer and use it in GitHub Desktop.
The quaternion you get fromTwoVectors() does not depend on their lengths
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//import 'dart:math'; | |
import 'package:vector_math/vector_math.dart'; | |
void main() { | |
var x1 = Vector3(1, 0, 0); | |
var x2 = Vector3(2, 0, 0); | |
//var y = Vector3(0,0,1); | |
var z1 = Vector3(0, 1, 0); | |
var z3 = Vector3(0, 3, 0); | |
var q1 = Quaternion.fromTwoVectors(x1, z1); | |
var q2 = Quaternion.fromTwoVectors(x2, z3); | |
print(q1); | |
print(q2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment