Quaternion.fromJson constructor
Quaternion.fromJson(
- Object? j
Implementation
factory Quaternion.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return Quaternion(
x: switch (json['x']) {
null => 0,
Object $1 => decodeDouble($1),
},
y: switch (json['y']) {
null => 0,
Object $1 => decodeDouble($1),
},
z: switch (json['z']) {
null => 0,
Object $1 => decodeDouble($1),
},
w: switch (json['w']) {
null => 0,
Object $1 => decodeDouble($1),
},
);
}