Upgraded to latest sigils release.
This added the ability to more easily print Vectors and Quaternions. This also fixes some style issues. Missing documents will now cause warnings when building.
This commit is contained in:
@ -71,9 +71,8 @@ pub fn main()
|
||||
|
||||
println!("Transmuting a Quaternion:");
|
||||
|
||||
println!("Converting the value [{1}, <{2}, {3}, {4}>] {0}",
|
||||
"into and out of an array of bytes.",
|
||||
quat.scalar, quat.vector.x, quat.vector.y, quat.vector.z);
|
||||
println!("Converting the value {} into and out of an array of bytes.",
|
||||
quat);
|
||||
println!("Buffer starts as: {}", stringify_array(&buffer));
|
||||
|
||||
// Convert the Vector2 into an array of bytes.
|
||||
@ -83,7 +82,5 @@ pub fn main()
|
||||
|
||||
// Convert the array of bytes into a Vector2.
|
||||
final_quat = Quaternion::from_bytes(&buffer, endianess);
|
||||
println!("The buffer converts back to: [{}, <{}, {}, {}>]",
|
||||
final_quat.scalar, final_quat.vector.x,
|
||||
final_quat.vector.y, final_quat.vector.z);
|
||||
println!("The buffer converts back to: {}", final_quat);
|
||||
}
|
||||
|
@ -71,8 +71,8 @@ pub fn main()
|
||||
|
||||
println!("Transmuting a Vector2:");
|
||||
|
||||
println!("Converting the value [{}, {}] into and out of an array of bytes.",
|
||||
vec.x, vec.y);
|
||||
println!("Converting the value {} into and out of an array of bytes.",
|
||||
vec);
|
||||
println!("Buffer starts as: {}", stringify_array(&buffer));
|
||||
|
||||
// Convert the Vector2 into an array of bytes.
|
||||
@ -82,5 +82,5 @@ pub fn main()
|
||||
|
||||
// Convert the array of bytes into a Vector2.
|
||||
final_vec = Vector2::from_bytes(&buffer, endianess);
|
||||
println!("The buffer converts back to: [{}, {}]", final_vec.x, final_vec.y);
|
||||
println!("The buffer converts back to: {}", final_vec);
|
||||
}
|
||||
|
Reference in New Issue
Block a user