Merge branch 'master' into translations
This commit is contained in:
commit
70ea6a8901
@ -151,7 +151,7 @@ void bounding_box_calculate_path_box(GList *vertices, double thickness,
|
|||||||
GList *vertex_iterator;
|
GList *vertex_iterator;
|
||||||
struct vector_2d pt;
|
struct vector_2d pt;
|
||||||
|
|
||||||
//printf("Warning! Function bounding_box_calculate_path_box not yet implemented correctly!\n");
|
//printf("Warning! Function %s not yet implemented correctly!\n", __func__);
|
||||||
|
|
||||||
if (!vertices || !box)
|
if (!vertices || !box)
|
||||||
return;
|
return;
|
||||||
|
@ -46,6 +46,7 @@ double vector_2d_scalar_multipy(struct vector_2d *a, struct vector_2d *b)
|
|||||||
void vector_2d_normalize(struct vector_2d *vec)
|
void vector_2d_normalize(struct vector_2d *vec)
|
||||||
{
|
{
|
||||||
double len;
|
double len;
|
||||||
|
|
||||||
if (!vec)
|
if (!vec)
|
||||||
return;
|
return;
|
||||||
len = sqrt(pow(vec->x, 2) + pow(vec->y, 2));
|
len = sqrt(pow(vec->x, 2) + pow(vec->y, 2));
|
||||||
@ -97,10 +98,9 @@ struct vector_2d *vector_2d_alloc(void)
|
|||||||
|
|
||||||
void vector_2d_free(struct vector_2d *vec)
|
void vector_2d_free(struct vector_2d *vec)
|
||||||
{
|
{
|
||||||
if (vec) {
|
if (vec)
|
||||||
free(vec);
|
free(vec);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void vector_2d_scale(struct vector_2d *vec, double scale)
|
void vector_2d_scale(struct vector_2d *vec, double scale)
|
||||||
{
|
{
|
||||||
@ -114,9 +114,9 @@ void vector_2d_scale(struct vector_2d *vec, double scale)
|
|||||||
double vector_2d_abs(struct vector_2d *vec)
|
double vector_2d_abs(struct vector_2d *vec)
|
||||||
{
|
{
|
||||||
double len = 0.0;
|
double len = 0.0;
|
||||||
if (vec) {
|
|
||||||
|
if (vec)
|
||||||
len = sqrt(pow(vec->x, 2) + pow(vec->y, 2));
|
len = sqrt(pow(vec->x, 2) + pow(vec->y, 2));
|
||||||
}
|
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user