Vector2
Object Hierarchy:
Description:
[ CCode ( copy_function = "g_boxed_copy" , free_function = "g_boxed_free" , type_id = "gimp_vector2_get_type ()" ) ]
[ Compact ]
public class Vector2
A two dimensional vector.
Content:
Creation methods:
Methods:
- public void @set (double x, double y)
Sets the X and Y coordinates of this
to x and y.
- public void add (Vector2 vector1, Vector2 vector2)
- public Vector2 add_val (Vector2 vector2)
This function is identical to
vector2_add but the vectors are passed by value rather than by reference.
- public Vector2 cross_product (Vector2 vector2)
Compute the cross product of two vectors.
- public Vector2 cross_product_val (Vector2 vector2)
Identical to [method@Vector2.
- public double inner_product (Vector2 vector2)
Computes the inner (dot) product of two 2D vectors.
- public double inner_product_val (Vector2 vector2)
Identical to [method@Vector2.
- public double length ()
Computes the length of a 2D vector.
- public double length_val ()
Identical to [method@Vector2.
- public void mul (double factor)
Multiplies each component of the this
by factor.
- public Vector2 mul_val (double factor)
Identical to [method@Vector2.
- public void neg ()
Negates the this (i.
- public Vector2 neg_val ()
Identical to [method@Vector2.
- public Vector2 normal ()
Compute a normalized perpendicular vector to
this
- public Vector2 normal_val ()
Identical to [method@Vector2.
- public void normalize ()
Normalizes the this so the length of
the this is 1.0.
- public Vector2 normalize_val ()
Identical to [method@Vector2.
- public void rotate (double alpha)
Rotates the this counterclockwise by
alpha radians.
- public Vector2 rotate_val (double alpha)
Identical to [method@Vector2.
- public void sub (Vector2 vector1, Vector2 vector2)
- public Vector2 sub_val (Vector2 vector2)
This function is identical to
vector2_sub but the vectors are passed by value rather than by reference.
Fields: