Skip to content

Instantly share code, notes, and snippets.

View NicholasSterling's full-sized avatar

Nicholas Sterling NicholasSterling

View GitHub Profile
@NicholasSterling
NicholasSterling / main.dart
Created December 29, 2022 08:41
fluttering-toast-6811
import 'dart:math';
import 'package:vector_math/vector_math.dart';
// Here we calculate the angle in Z of the midLine
// of a woman standing straight up.
void main() {
var ls = Vector3(
0.5335670709609985,
0.3110794723033905,
@NicholasSterling
NicholasSterling / main.dart
Created December 29, 2022 08:34
fluttering-toast-6811
import 'dart:math';
import 'package:vector_math/vector_math.dart';
// Here we calculate the angle in Z of the midLine
// of a woman standing straight up.
void main() {
var ls = Vector3(
0.5335670709609985,
0.3110794723033905,
@NicholasSterling
NicholasSterling / main.dart
Created October 28, 2022 17:43
The quaternion you get fromTwoVectors() does not depend on their lengths
//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);
#define COMPILE_TIME_ASSERT(pred) switch(0){case 0:case pred:;}
@NicholasSterling
NicholasSterling / c_cpp_properties.json
Created November 7, 2018 01:37
Visual Studio Code (vscode) configuration for working with kernel modules on Ubuntu 16.04
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"/usr/src/linux-headers-4.15.0-36/include/**",
"/usr/src/linux-headers-4.15.0-36/arch/x86/include/**",
"/usr/src/linux-headers-4.15.0-36-generic/include/**",
"/usr/src/linux-headers-4.15.0-36-generic/arch/x86/include/**"