Lines Matching refs:PI

14 use Slic3r::Geometry qw(rad2deg_dir angle3points PI);
20 is line_atan([ [10, 0], [0, 0] ]), (PI), 'W atan2';
21 is line_atan([ [0, 0], [0, 10] ]), (PI/2), 'N atan2';
22 is line_atan([ [0, 10], [0, 0] ]), -(PI/2), 'S atan2';
24 is line_atan([ [10, 10], [0, 0] ]), -(PI*3/4), 'SW atan2';
25 is line_atan([ [0, 0], [10, 10] ]), (PI*1/4), 'NE atan2';
26 is line_atan([ [0, 10], [10, 0] ]), -(PI*1/4), 'SE atan2';
27 is line_atan([ [10, 0], [0, 10] ]), (PI*3/4), 'NW atan2';
34 is line_orientation([ [0, 0], [0, 10] ]), (PI/2), 'N orientation';
35 is line_orientation([ [10, 0], [0, 0] ]), (PI), 'W orientation';
36 is line_orientation([ [0, 10], [0, 0] ]), (PI*3/2), 'S orientation';
38 is line_orientation([ [0, 0], [10, 10] ]), (PI*1/4), 'NE orientation';
39 is line_orientation([ [10, 0], [0, 10] ]), (PI*3/4), 'NW orientation';
40 is line_orientation([ [10, 10], [0, 0] ]), (PI*5/4), 'SW orientation';
41 is line_orientation([ [0, 10], [10, 0] ]), (PI*7/4), 'SE orientation';
49 is line_direction([ [0, 0], [0, 10] ]), (PI/2), 'N direction';
50 is line_direction([ [0, 10], [0, 0] ]), (PI/2), 'S direction';
52 is line_direction([ [10, 10], [0, 0] ]), (PI*1/4), 'SW direction';
53 is line_direction([ [0, 0], [10, 10] ]), (PI*1/4), 'NE direction';
54 is line_direction([ [0, 10], [10, 0] ]), (PI*3/4), 'SE direction';
55 is line_direction([ [10, 0], [0, 10] ]), (PI*3/4), 'NW direction';
62 is rad2deg_dir(PI), 270, 'W (degrees)';
63 is rad2deg_dir(PI/2), 0, 'N (degrees)';
64 is rad2deg_dir(-(PI/2)), 180, 'S (degrees)';
65 is rad2deg_dir(PI*1/4), 45, 'NE (degrees)';
66 is rad2deg_dir(PI*3/4), 135, 'NW (degrees)';
67 is rad2deg_dir(PI/6), 60, '30°';
68 is rad2deg_dir(PI/6*2), 30, '60°';
74 is angle3points([0,0], [10,0], [0,10]), PI/2, 'CW angle3points';
75 is angle3points([0,0], [0,10], [10,0]), PI/2*3, 'CCW angle3points';