fixed bench macros

This commit is contained in:
Colin Sherratt 2015-01-09 15:59:43 -07:00
parent bc89f14250
commit dde1fd26be
2 changed files with 4 additions and 4 deletions

View file

@ -82,7 +82,7 @@ macro_rules! bench_unop(
);
macro_rules! bench_construction(
($name: ident, $t: ty, $constructor: path $(, $args: ident: $types: ty)*) => {
($name: ident, $t: ty, $constructor: path [ $($args: ident: $types: ty),+ ]) => {
#[bench]
fn $name(bh: &mut Bencher) {
const LEN: uint = 1 << 13;

View file

@ -55,7 +55,7 @@ fn _bench_rot3_from_axisangle(bh: &mut Bencher) {
bench_from_axis_angle::<Basis3<f32>>(bh)
}
bench_construction!(_bench_rot2_from_axisangle, Basis2<f32>, Rotation2::from_angle, angle: Rad<f32>);
bench_construction!(_bench_rot2_from_axisangle, Basis2<f32>, Rotation2::from_angle [ angle: Rad<f32> ]);
bench_construction!(_bench_quat_from_euler_angles, Quaternion<f32>, Rotation3::from_euler, roll: Rad<f32>, pitch: Rad<f32>, yaw: Rad<f32>);
bench_construction!(_bench_rot3_from_euler_angles, Basis3<f32>, Rotation3::from_euler, roll: Rad<f32>, pitch: Rad<f32>, yaw: Rad<f32>);
bench_construction!(_bench_quat_from_euler_angles, Quaternion<f32>, Rotation3::from_euler [roll: Rad<f32>, pitch: Rad<f32>, yaw: Rad<f32>]);
bench_construction!(_bench_rot3_from_euler_angles, Basis3<f32>, Rotation3::from_euler [roll: Rad<f32>, pitch: Rad<f32>, yaw: Rad<f32>]);