mirror of https://github.com/GNOME/gimp.git
Removed embedded EOLs and spaces from tooltips, few typos.
Sun Jul 30 12:52:16 CEST 2000 Stanislav Brabec <utx@penguin.cz> * plug-ins/gap/gap_mov_dialog.c: Removed embedded EOLs and spaces from tooltips, few typos. Sun Jul 30 12:52:16 CEST 2000 Stanislav Brabec <utx@penguin.cz> On request of Martin Weber <martweb@gmx.net>: * plug-ins/sel2path/bitmap.h * plug-ins/sel2path/bounding-box.h * plug-ins/sel2path/global.h * plug-ins/sel2path/math.c * plug-ins/sel2path/vector.c * plug-ins/sel2path/vector.h plug-ins/sel2path has a number of functions that are declared as returning a `const' return value. The ANSI spec is a bit vague on it, but my reading of the spec indicates that the intent is that this is not legal. In any case, at least one compiler (the compiler on AIX and on IRIX and lcc) objects to functions that are declared/defined to return a const value.
This commit is contained in:
parent
f1fcbeeb44
commit
294a54846e
21
ChangeLog
21
ChangeLog
|
@ -1,3 +1,24 @@
|
|||
Sun Jul 30 12:52:16 CEST 2000 Stanislav Brabec <utx@penguin.cz>
|
||||
|
||||
* plug-ins/gap/gap_mov_dialog.c: Removed embedded EOLs and spaces from
|
||||
tooltips, few typos.
|
||||
|
||||
Sun Jul 30 12:52:16 CEST 2000 Stanislav Brabec <utx@penguin.cz>
|
||||
|
||||
On request of Martin Weber <martweb@gmx.net>:
|
||||
* plug-ins/sel2path/bitmap.h
|
||||
* plug-ins/sel2path/bounding-box.h
|
||||
* plug-ins/sel2path/global.h
|
||||
* plug-ins/sel2path/math.c
|
||||
* plug-ins/sel2path/vector.c
|
||||
* plug-ins/sel2path/vector.h
|
||||
plug-ins/sel2path has a number of functions that are declared as
|
||||
returning a `const' return value. The ANSI spec is a bit vague on it,
|
||||
but my reading of the spec indicates that the intent is that this is
|
||||
not legal. In any case, at least one compiler (the compiler on AIX and
|
||||
on IRIX and lcc) objects to functions that are declared/defined to
|
||||
return a const value.
|
||||
|
||||
2000-07-30 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/errors.[ch]
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
* version 0.95.00; 1998.05.12 hof: added rotatation capabilities
|
||||
* version 0.94.00; 1998.04.25 hof: use only one point as default
|
||||
* bugfix: initial value for src_paintmode
|
||||
* fixes the problem reported in p_my_layer_copy (cant get new layer)
|
||||
* fixes the problem reported in p_my_layer_copy (can't get new layer)
|
||||
* version 0.90.00; 1997.12.14 hof: 1.st (pre) release
|
||||
*/
|
||||
|
||||
|
@ -335,7 +335,7 @@ long p_move_dialog (t_mov_data *mov_ptr)
|
|||
path_ptr = g_new( t_mov_path_preview, 1 );
|
||||
if(path_ptr == NULL)
|
||||
{
|
||||
printf("error cant alloc path_preview structure\n");
|
||||
printf("error can't alloc path_preview structure\n");
|
||||
return -1;
|
||||
}
|
||||
path_ptr->show_path = TRUE;
|
||||
|
@ -500,7 +500,7 @@ mov_dialog ( GDrawable *drawable, t_mov_path_preview *path_ptr,
|
|||
path_ptr);
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, TRUE, TRUE, 0);
|
||||
gimp_help_set_help_data(button,
|
||||
_("Show PreviewFrame with Selected \nSrcLayer at current Controlpoint")
|
||||
_("Show PreviewFrame with Selected SrcLayer at current Controlpoint")
|
||||
, NULL);
|
||||
gtk_widget_show (button);
|
||||
|
||||
|
@ -511,7 +511,7 @@ mov_dialog ( GDrawable *drawable, t_mov_path_preview *path_ptr,
|
|||
path_ptr);
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, TRUE, TRUE, 0);
|
||||
gimp_help_set_help_data(button,
|
||||
_("Generate Animated Preview\nas multilayer image")
|
||||
_("Generate Animated Preview as multilayer image")
|
||||
, NULL);
|
||||
gtk_widget_show (button);
|
||||
|
||||
|
@ -565,7 +565,7 @@ mov_dialog ( GDrawable *drawable, t_mov_path_preview *path_ptr,
|
|||
0, /* digits */
|
||||
TRUE, /* constrain */
|
||||
(gfloat)first_nr, (gfloat)last_nr, /* lower, upper (unconstrained) */
|
||||
_("first handled frame"), NULL); /* tooltip privatetip */
|
||||
_("First handled frame"), NULL); /* tooltip privatetip */
|
||||
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
|
||||
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
|
||||
&pvals->dst_range_start);
|
||||
|
@ -580,7 +580,7 @@ mov_dialog ( GDrawable *drawable, t_mov_path_preview *path_ptr,
|
|||
0, /* digits */
|
||||
TRUE, /* constrain */
|
||||
(gfloat)first_nr, (gfloat)last_nr, /* lower, upper (unconstrained) */
|
||||
_("last handled frame"), NULL); /* tooltip privatetip */
|
||||
_("Last handled frame"), NULL); /* tooltip privatetip */
|
||||
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
|
||||
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
|
||||
&pvals->dst_range_end);
|
||||
|
@ -595,7 +595,7 @@ mov_dialog ( GDrawable *drawable, t_mov_path_preview *path_ptr,
|
|||
0, /* digits */
|
||||
TRUE, /* constrain */
|
||||
(gfloat)first_nr, (gfloat)last_nr, /* lower, upper (unconstrained) */
|
||||
_("frame to show when UpdPreview\nbutton is pressed"),
|
||||
_("Frame to show when UpdPreview button is pressed"),
|
||||
NULL); /* tooltip privatetip */
|
||||
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
|
||||
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
|
||||
|
@ -611,7 +611,7 @@ mov_dialog ( GDrawable *drawable, t_mov_path_preview *path_ptr,
|
|||
0, /* digits */
|
||||
FALSE, /* constrain */
|
||||
0.0, 999999.0, /* lower, upper (unconstrained) */
|
||||
_("How to insert SrcLayer into the\nDst. Frame's Layerstack\n0 means on top i.e. in front"),
|
||||
_("How to insert SrcLayer into the Dst. Frame's Layerstack\n0 means on top i.e. in front"),
|
||||
NULL); /* tooltip privatetip */
|
||||
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
|
||||
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
|
||||
|
@ -641,7 +641,7 @@ mov_dialog ( GDrawable *drawable, t_mov_path_preview *path_ptr,
|
|||
&pvals->clip_to_img);
|
||||
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (check_button), pvals->clip_to_img);
|
||||
gimp_help_set_help_data(check_button,
|
||||
_("Clip all copied Src-Layers\nat Frame Boundaries")
|
||||
_("Clip all copied Src-Layers at Frame Boundaries")
|
||||
, NULL);
|
||||
gtk_widget_show (check_button);
|
||||
gtk_box_pack_start (GTK_BOX (vcbox), check_button, TRUE, TRUE, 0);
|
||||
|
@ -809,7 +809,7 @@ mov_apv_callback (GtkWidget *widget,
|
|||
|
||||
apv_locked = TRUE;
|
||||
|
||||
if(gap_debug) printf("mov_apv_callback preview_frame_nr: %d \n",
|
||||
if(gap_debug) printf("mov_apv_callback preview_frame_nr: %d\n",
|
||||
(int)path_ptr->preview_frame_nr);
|
||||
|
||||
|
||||
|
@ -1996,7 +1996,7 @@ mov_src_sel_create()
|
|||
menu = p_buildmenu (option_step_items);
|
||||
gtk_option_menu_set_menu(GTK_OPTION_MENU(option_menu), menu);
|
||||
gimp_help_set_help_data(option_menu,
|
||||
_("How to fetch the next SrcLayer \nat the next handled frame")
|
||||
_("How to fetch the next SrcLayer at the next handled frame")
|
||||
, NULL);
|
||||
gtk_widget_show(option_menu);
|
||||
|
||||
|
@ -2020,7 +2020,7 @@ mov_src_sel_create()
|
|||
menu = p_buildmenu (option_handle_items);
|
||||
gtk_option_menu_set_menu(GTK_OPTION_MENU(option_menu), menu);
|
||||
gimp_help_set_help_data(option_menu,
|
||||
_("How to place the SrcLayer at \nControlpoint Coordinates")
|
||||
_("How to place the SrcLayer at Controlpoint Coordinates")
|
||||
, NULL);
|
||||
gtk_widget_show(option_menu);
|
||||
|
||||
|
@ -2158,7 +2158,7 @@ mov_path_prevw_create ( GDrawable *drawable, t_mov_path_preview *path_ptr)
|
|||
0, /* digits */
|
||||
FALSE, /* constrain */
|
||||
(gfloat)1, (gfloat)1000, /* lower, upper (unconstrained) */
|
||||
_("Scale SrcLayer's Height\nin percent"),
|
||||
_("Scale SrcLayer's Height in percent"),
|
||||
NULL); /* tooltip privatetip */
|
||||
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
|
||||
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
|
||||
|
@ -2175,7 +2175,7 @@ mov_path_prevw_create ( GDrawable *drawable, t_mov_path_preview *path_ptr)
|
|||
0, /* digits */
|
||||
TRUE, /* constrain */
|
||||
(gfloat)0, (gfloat)100, /* lower, upper (unconstrained) */
|
||||
_("SrcLayer's Opacity\nin percent"),
|
||||
_("SrcLayer's Opacity in percent"),
|
||||
NULL); /* tooltip privatetip */
|
||||
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
|
||||
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
|
||||
|
@ -2294,7 +2294,7 @@ mov_path_prevw_create ( GDrawable *drawable, t_mov_path_preview *path_ptr)
|
|||
gtk_table_attach( GTK_TABLE(button_table), button, 0, 1, row, row+1,
|
||||
GTK_FILL, 0, 0, 0 );
|
||||
gimp_help_set_help_data(button,
|
||||
_("Add Controlpoint at end \n(the last Point is duplicated)")
|
||||
_("Add Controlpoint at end\n(the last Point is duplicated)")
|
||||
, NULL);
|
||||
gtk_widget_show (button);
|
||||
|
||||
|
@ -2305,8 +2305,8 @@ mov_path_prevw_create ( GDrawable *drawable, t_mov_path_preview *path_ptr)
|
|||
path_ptr);
|
||||
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (check_button), path_ptr->show_path);
|
||||
gimp_help_set_help_data(check_button,
|
||||
_("Show Path Lines and enable\n"
|
||||
"pick/drag with left button\n"
|
||||
_("Show Path Lines and enable "
|
||||
"pick/drag with left button "
|
||||
"or move with right button")
|
||||
, NULL);
|
||||
gtk_widget_show (check_button);
|
||||
|
@ -2323,7 +2323,7 @@ mov_path_prevw_create ( GDrawable *drawable, t_mov_path_preview *path_ptr)
|
|||
gtk_table_attach( GTK_TABLE(button_table), button, 0, 1, row, row+1,
|
||||
GTK_FILL, 0, 0, 0 );
|
||||
gimp_help_set_help_data(button,
|
||||
_("Insert Controlpoint \n(the current Point is duplicated)")
|
||||
_("Insert Controlpoint\n(the current Point is duplicated)")
|
||||
, NULL);
|
||||
gtk_widget_show (button);
|
||||
|
||||
|
@ -2401,7 +2401,7 @@ mov_path_prevw_create ( GDrawable *drawable, t_mov_path_preview *path_ptr)
|
|||
gtk_table_attach( GTK_TABLE(button_table), button, 0, 1, row, row+1,
|
||||
GTK_FILL, 0, 0, 0 );
|
||||
gimp_help_set_help_data(button,
|
||||
_("Reset the current Controlpoint\nto default Values")
|
||||
_("Reset the current Controlpoint to default Values")
|
||||
, NULL);
|
||||
gtk_widget_show (button);
|
||||
|
||||
|
@ -2413,7 +2413,7 @@ mov_path_prevw_create ( GDrawable *drawable, t_mov_path_preview *path_ptr)
|
|||
gtk_table_attach( GTK_TABLE(button_table), button, 1, 2, row, row+1,
|
||||
GTK_FILL, 0, 0, 0 );
|
||||
gimp_help_set_help_data(button,
|
||||
_("Reset all Controlpoints to default Values\n"
|
||||
_("Reset all Controlpoints to default Values "
|
||||
"but dont change the path (X/Y Values)")
|
||||
, NULL);
|
||||
gtk_widget_show (button);
|
||||
|
@ -2431,7 +2431,7 @@ mov_path_prevw_create ( GDrawable *drawable, t_mov_path_preview *path_ptr)
|
|||
gtk_table_attach( GTK_TABLE(button_table), button, 0, 1, row, row+1,
|
||||
GTK_FILL, 0, 0, 0 );
|
||||
gimp_help_set_help_data(button,
|
||||
_("Set Rotation for all Controlpoints\n"
|
||||
_("Set Rotation for all Controlpoints "
|
||||
"to follow the shape of the path.\n"
|
||||
"(Shift: use Rotation of contolpoint 1 as offset)")
|
||||
, NULL);
|
||||
|
@ -3007,7 +3007,7 @@ p_chk_keyframes(t_mov_path_preview *path_ptr)
|
|||
{
|
||||
keychk_locked = TRUE;
|
||||
p_init_arr_arg(&argv[0], WGT_LABEL);
|
||||
argv[0].label_txt = _("Cant operate with current Controlpoint\nor Keyframe settings");
|
||||
argv[0].label_txt = _("Can't operate with current Controlpoint\nor Keyframe settings");
|
||||
|
||||
p_init_arr_arg(&argv[1], WGT_LABEL);
|
||||
argv[1].label_txt = l_err_lbltext;
|
||||
|
@ -3278,7 +3278,7 @@ p_mov_render(gint32 image_id, t_mov_values *val_ptr, t_mov_current *cur_ptr)
|
|||
if(l_cp_layer_mask_id >= 0)
|
||||
{
|
||||
/* apply the layermask
|
||||
* some transitions (especially rotate) cant operate proper on
|
||||
* some transitions (especially rotate) can't operate proper on
|
||||
* layers with masks !
|
||||
* (tests with gimp-rotate resulted in trashed images,
|
||||
* even if the mask was rotated too)
|
||||
|
|
|
@ -95,7 +95,7 @@ extern bitmap_type extract_subbitmap (bitmap_type b, bounding_box_type bb);
|
|||
refers to pixels, rather than edges. Specifically, this means that
|
||||
the maximum column is one less than results from `dimensions_to_bb
|
||||
(BITMAP_DIMENSIONS ())'. */
|
||||
extern const bounding_box_type bitmap_to_bb (const bitmap_type);
|
||||
extern bounding_box_type bitmap_to_bb (const bitmap_type);
|
||||
|
||||
/* Return a vector of zero-based column numbers marking transitions from
|
||||
black to white or white to black in ROW, which is of length WIDTH.
|
||||
|
|
|
@ -51,8 +51,8 @@ typedef struct
|
|||
|
||||
/* Convert a dimensions structure to an integer bounding box, and vice
|
||||
versa. */
|
||||
extern const bounding_box_type dimensions_to_bb (dimensions_type);
|
||||
extern const dimensions_type bb_to_dimensions (bounding_box_type);
|
||||
extern bounding_box_type dimensions_to_bb (dimensions_type);
|
||||
extern dimensions_type bb_to_dimensions (bounding_box_type);
|
||||
|
||||
|
||||
/* Update the bounding box BB from the point P. */
|
||||
|
|
|
@ -152,24 +152,24 @@ extern void safe_free (address *p);
|
|||
`scaled_num', so more precision than this will be lost when we
|
||||
output, anyway. */
|
||||
#define REAL_EPSILON 0.00001
|
||||
extern const boolean epsilon_equal (real v1, real v2);
|
||||
extern boolean epsilon_equal (real v1, real v2);
|
||||
|
||||
/* Arc cosine, in degrees. */
|
||||
extern const real my_acosd (real);
|
||||
extern real my_acosd (real);
|
||||
|
||||
/* Return the Euclidean distance between the two points. */
|
||||
extern const real distance (real_coordinate_type, real_coordinate_type);
|
||||
extern const real int_distance (coordinate_type, coordinate_type);
|
||||
extern real distance (real_coordinate_type, real_coordinate_type);
|
||||
extern real int_distance (coordinate_type, coordinate_type);
|
||||
|
||||
/* Slope between two points (delta y per unit x). */
|
||||
extern const real slope (real_coordinate_type, real_coordinate_type);
|
||||
extern real slope (real_coordinate_type, real_coordinate_type);
|
||||
|
||||
/* Make a real coordinate from an integer one, and vice versa. */
|
||||
extern const real_coordinate_type int_to_real_coord (coordinate_type);
|
||||
extern const coordinate_type real_to_int_coord (real_coordinate_type);
|
||||
extern real_coordinate_type int_to_real_coord (coordinate_type);
|
||||
extern coordinate_type real_to_int_coord (real_coordinate_type);
|
||||
|
||||
/* Test if two integer points are adjacent. */
|
||||
extern const boolean points_adjacent_p (int row1, int col1, int r2, int c2);
|
||||
extern boolean points_adjacent_p (int row1, int col1, int r2, int c2);
|
||||
|
||||
/* Find the largest and smallest elements of an array. */
|
||||
extern void find_bounds (real values[], unsigned value_count,
|
||||
|
|
|
@ -34,7 +34,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
larger or smaller than its true value. When it matters, we need to
|
||||
compare with some tolerance, REAL_EPSILON, defined in kbase.h. */
|
||||
|
||||
const boolean
|
||||
boolean
|
||||
epsilon_equal (real v1, real v2)
|
||||
{
|
||||
return
|
||||
|
@ -45,7 +45,7 @@ epsilon_equal (real v1, real v2)
|
|||
|
||||
/* Return the Euclidean distance between P1 and P2. */
|
||||
|
||||
const real
|
||||
real
|
||||
distance (real_coordinate_type p1, real_coordinate_type p2)
|
||||
{
|
||||
return hypot (p1.x - p2.x, p1.y - p2.y);
|
||||
|
@ -53,7 +53,7 @@ distance (real_coordinate_type p1, real_coordinate_type p2)
|
|||
|
||||
|
||||
/* Same thing, for integer points. */
|
||||
const real
|
||||
real
|
||||
int_distance (coordinate_type p1, coordinate_type p2)
|
||||
{
|
||||
return hypot ((double) p1.x - p2.x, (double) p1.y - p2.y);
|
||||
|
@ -63,7 +63,7 @@ int_distance (coordinate_type p1, coordinate_type p2)
|
|||
/* Return the arc cosine of V, in degrees in the range zero to 180. V
|
||||
is taken to be in radians. */
|
||||
|
||||
const real
|
||||
real
|
||||
my_acosd (real v)
|
||||
{
|
||||
real a;
|
||||
|
@ -84,7 +84,7 @@ my_acosd (real v)
|
|||
|
||||
/* The slope of the line defined by COORD1 and COORD2. */
|
||||
|
||||
const real
|
||||
real
|
||||
slope (real_coordinate_type coord1, real_coordinate_type coord2)
|
||||
{
|
||||
assert (coord2.x - coord1.x != 0);
|
||||
|
@ -95,7 +95,7 @@ slope (real_coordinate_type coord1, real_coordinate_type coord2)
|
|||
|
||||
/* Turn an integer point into a real one, and vice versa. */
|
||||
|
||||
const real_coordinate_type
|
||||
real_coordinate_type
|
||||
int_to_real_coord (coordinate_type int_coord)
|
||||
{
|
||||
real_coordinate_type real_coord;
|
||||
|
@ -107,7 +107,7 @@ int_to_real_coord (coordinate_type int_coord)
|
|||
}
|
||||
|
||||
|
||||
const coordinate_type
|
||||
coordinate_type
|
||||
real_to_int_coord (real_coordinate_type real_coord)
|
||||
{
|
||||
coordinate_type int_coord;
|
||||
|
@ -121,7 +121,7 @@ real_to_int_coord (real_coordinate_type real_coord)
|
|||
|
||||
/* See if two points (described by their row and column) are adjacent. */
|
||||
|
||||
const boolean
|
||||
boolean
|
||||
points_adjacent_p (int row1, int col1, int row2, int col2)
|
||||
{
|
||||
int row_diff = abs (row1 - row2);
|
||||
|
|
|
@ -29,7 +29,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||
|
||||
/* Given the point COORD, return the corresponding vector. */
|
||||
|
||||
const vector_type
|
||||
vector_type
|
||||
make_vector (const real_coordinate_type c)
|
||||
{
|
||||
vector_type v;
|
||||
|
@ -43,7 +43,7 @@ make_vector (const real_coordinate_type c)
|
|||
|
||||
/* And the converse: given a vector, return the corresponding point. */
|
||||
|
||||
const real_coordinate_type
|
||||
real_coordinate_type
|
||||
vector_to_point (const vector_type v)
|
||||
{
|
||||
real_coordinate_type coord;
|
||||
|
@ -55,14 +55,14 @@ vector_to_point (const vector_type v)
|
|||
}
|
||||
|
||||
|
||||
const real
|
||||
real
|
||||
magnitude (const vector_type v)
|
||||
{
|
||||
return hypot (v.dx, v.dy);
|
||||
}
|
||||
|
||||
|
||||
const vector_type
|
||||
vector_type
|
||||
normalize (const vector_type v)
|
||||
{
|
||||
vector_type new_v;
|
||||
|
@ -77,7 +77,7 @@ normalize (const vector_type v)
|
|||
}
|
||||
|
||||
|
||||
const vector_type
|
||||
vector_type
|
||||
Vadd (const vector_type v1, const vector_type v2)
|
||||
{
|
||||
vector_type new_v;
|
||||
|
@ -89,14 +89,14 @@ Vadd (const vector_type v1, const vector_type v2)
|
|||
}
|
||||
|
||||
|
||||
const real
|
||||
real
|
||||
Vdot (const vector_type v1, const vector_type v2)
|
||||
{
|
||||
return v1.dx * v2.dx + v1.dy * v2.dy;
|
||||
}
|
||||
|
||||
|
||||
const vector_type
|
||||
vector_type
|
||||
Vmult_scalar (const vector_type v, const real r)
|
||||
{
|
||||
vector_type new_v;
|
||||
|
@ -111,7 +111,7 @@ Vmult_scalar (const vector_type v, const real r)
|
|||
/* Given the IN_VECTOR and OUT_VECTOR, return the angle between them in
|
||||
degrees, in the range zero to 180. */
|
||||
|
||||
const real
|
||||
real
|
||||
Vangle (const vector_type in_vector, const vector_type out_vector)
|
||||
{
|
||||
vector_type v1 = normalize (in_vector);
|
||||
|
@ -121,7 +121,7 @@ Vangle (const vector_type in_vector, const vector_type out_vector)
|
|||
}
|
||||
|
||||
|
||||
const real_coordinate_type
|
||||
real_coordinate_type
|
||||
Vadd_point (const real_coordinate_type c, const vector_type v)
|
||||
{
|
||||
real_coordinate_type new_c;
|
||||
|
@ -132,7 +132,7 @@ Vadd_point (const real_coordinate_type c, const vector_type v)
|
|||
}
|
||||
|
||||
|
||||
const real_coordinate_type
|
||||
real_coordinate_type
|
||||
Vsubtract_point (const real_coordinate_type c, const vector_type v)
|
||||
{
|
||||
real_coordinate_type new_c;
|
||||
|
@ -143,7 +143,7 @@ Vsubtract_point (const real_coordinate_type c, const vector_type v)
|
|||
}
|
||||
|
||||
|
||||
const coordinate_type
|
||||
coordinate_type
|
||||
Vadd_int_point (const coordinate_type c, const vector_type v)
|
||||
{
|
||||
coordinate_type a;
|
||||
|
@ -154,7 +154,7 @@ Vadd_int_point (const coordinate_type c, const vector_type v)
|
|||
}
|
||||
|
||||
|
||||
const vector_type
|
||||
vector_type
|
||||
Vabs (const vector_type v)
|
||||
{
|
||||
vector_type new_v;
|
||||
|
@ -167,7 +167,7 @@ Vabs (const vector_type v)
|
|||
|
||||
/* Operations on points. */
|
||||
|
||||
const vector_type
|
||||
vector_type
|
||||
Psubtract (const real_coordinate_type c1, const real_coordinate_type c2)
|
||||
{
|
||||
vector_type v;
|
||||
|
@ -180,7 +180,7 @@ Psubtract (const real_coordinate_type c1, const real_coordinate_type c2)
|
|||
|
||||
/* Operations on integer points. */
|
||||
|
||||
const vector_type
|
||||
vector_type
|
||||
IPsubtract (const coordinate_type coord1, const coordinate_type coord2)
|
||||
{
|
||||
vector_type v;
|
||||
|
@ -192,7 +192,7 @@ IPsubtract (const coordinate_type coord1, const coordinate_type coord2)
|
|||
}
|
||||
|
||||
|
||||
const coordinate_type
|
||||
coordinate_type
|
||||
IPsubtractP (const coordinate_type c1, const coordinate_type c2)
|
||||
{
|
||||
coordinate_type c;
|
||||
|
@ -204,7 +204,7 @@ IPsubtractP (const coordinate_type c1, const coordinate_type c2)
|
|||
}
|
||||
|
||||
|
||||
const coordinate_type
|
||||
coordinate_type
|
||||
IPadd (const coordinate_type c1, const coordinate_type c2)
|
||||
{
|
||||
coordinate_type c;
|
||||
|
@ -216,7 +216,7 @@ IPadd (const coordinate_type c1, const coordinate_type c2)
|
|||
}
|
||||
|
||||
|
||||
const coordinate_type
|
||||
coordinate_type
|
||||
IPmult_scalar (const coordinate_type c, const int i)
|
||||
{
|
||||
coordinate_type a;
|
||||
|
@ -228,7 +228,7 @@ IPmult_scalar (const coordinate_type c, const int i)
|
|||
}
|
||||
|
||||
|
||||
const real_coordinate_type
|
||||
real_coordinate_type
|
||||
IPmult_real (const coordinate_type c, const real r)
|
||||
{
|
||||
real_coordinate_type a;
|
||||
|
@ -240,7 +240,7 @@ IPmult_real (const coordinate_type c, const real r)
|
|||
}
|
||||
|
||||
|
||||
const boolean
|
||||
boolean
|
||||
IPequal (const coordinate_type c1, const coordinate_type c2)
|
||||
{
|
||||
return c1.x == c2.x && c1.y == c2.y;
|
||||
|
|
|
@ -30,46 +30,46 @@ typedef struct
|
|||
|
||||
|
||||
/* Consider a point as a vector from the origin. */
|
||||
extern const vector_type make_vector (const real_coordinate_type);
|
||||
extern vector_type make_vector (const real_coordinate_type);
|
||||
|
||||
/* And a vector as a point, i.e., a displacement from the origin. */
|
||||
extern const real_coordinate_type vector_to_point (const vector_type);
|
||||
extern real_coordinate_type vector_to_point (const vector_type);
|
||||
|
||||
|
||||
/* Definitions for these common operations can be found in any decent
|
||||
linear algebra book, and most calculus books. */
|
||||
|
||||
extern const real magnitude (const vector_type);
|
||||
extern const vector_type normalize (const vector_type);
|
||||
extern real magnitude (const vector_type);
|
||||
extern vector_type normalize (const vector_type);
|
||||
|
||||
extern const vector_type Vadd (const vector_type, const vector_type);
|
||||
extern const real Vdot (const vector_type, const vector_type);
|
||||
extern const vector_type Vmult_scalar (const vector_type, const real);
|
||||
extern const real Vangle (const vector_type in, const vector_type out);
|
||||
extern vector_type Vadd (const vector_type, const vector_type);
|
||||
extern real Vdot (const vector_type, const vector_type);
|
||||
extern vector_type Vmult_scalar (const vector_type, const real);
|
||||
extern real Vangle (const vector_type in, const vector_type out);
|
||||
|
||||
/* These operations could have been named `P..._vector' just as well as
|
||||
V..._point, so we may as well allow both names. */
|
||||
#define Padd_vector Vadd_point
|
||||
extern const real_coordinate_type Vadd_point
|
||||
extern real_coordinate_type Vadd_point
|
||||
(const real_coordinate_type, const vector_type);
|
||||
|
||||
#define Psubtract_vector Vsubtract_point
|
||||
extern const real_coordinate_type Vsubtract_point
|
||||
extern real_coordinate_type Vsubtract_point
|
||||
(const real_coordinate_type, const vector_type);
|
||||
|
||||
/* This returns the rounded sum. */
|
||||
#define IPadd_vector Vadd_int_point
|
||||
extern const coordinate_type Vadd_int_point
|
||||
extern coordinate_type Vadd_int_point
|
||||
(const coordinate_type, const vector_type);
|
||||
|
||||
/* Take the absolute value of both components. */
|
||||
extern const vector_type Vabs (const vector_type);
|
||||
extern vector_type Vabs (const vector_type);
|
||||
|
||||
|
||||
/* Operations on points with real coordinates. It is not orthogonal,
|
||||
but more convenient, to have the subtraction operator return a
|
||||
vector, and the addition operator return a point. */
|
||||
extern const vector_type Psubtract
|
||||
extern vector_type Psubtract
|
||||
(const real_coordinate_type, const real_coordinate_type);
|
||||
|
||||
/* These are heavily used in spline fitting, so we define them as macros
|
||||
|
@ -81,15 +81,15 @@ extern const vector_type Psubtract
|
|||
|
||||
/* Similarly, for points with integer coordinates; here, a subtraction
|
||||
operator that does return another point is useful. */
|
||||
extern const vector_type IPsubtract
|
||||
extern vector_type IPsubtract
|
||||
(const coordinate_type, const coordinate_type);
|
||||
extern const coordinate_type IPsubtractP
|
||||
extern coordinate_type IPsubtractP
|
||||
(const coordinate_type, const coordinate_type);
|
||||
extern const coordinate_type IPadd
|
||||
extern coordinate_type IPadd
|
||||
(const coordinate_type, const coordinate_type);
|
||||
extern const coordinate_type IPmult_scalar (const coordinate_type, const int);
|
||||
extern const real_coordinate_type IPmult_real
|
||||
extern coordinate_type IPmult_scalar (const coordinate_type, const int);
|
||||
extern real_coordinate_type IPmult_real
|
||||
(const coordinate_type, const real);
|
||||
extern const boolean IPequal (const coordinate_type, const coordinate_type);
|
||||
extern boolean IPequal (const coordinate_type, const coordinate_type);
|
||||
|
||||
#endif /* not VECTOR_H */
|
||||
|
|
Loading…
Reference in New Issue