• allegro5.a5_display
  • allegro5.a5_file
  • allegro5.a5_font
  • allegro5.a5_image
  • allegro5.a5_joystick
  • allegro5.a5_main
  • allegro5.a5_misc
  • allegro5.a5_opengl
  • allegro5.a5_shader
  • allegro5.a5_sound
  • allegro5.a5_thread
  • allegro5.a5_triangles
  • animation
  • array
  • atlas
  • buffer
  • color
  • common
  • csg.csg_aabb
  • csg.csg
  • csg.csg_octree
  • csg.csg_shapes
  • csg.csg_test
  • data
  • display
  • exception
  • file
  • font
  • glsl
  • grid
  • hash
  • image
  • image_op
  • index
  • ini
  • isometric
  • joystick
  • keyboard
  • land
  • layer
  • list
  • log
  • main
  • map
  • mem
  • mouse
  • net
  • noise
  • openglutil
  • perlin
  • pixelmask
  • plasma
  • pool
  • protobuf
  • queue
  • random
  • runner
  • shader
  • sound
  • sprite
  • thread
  • tilegrid
  • triangles
  • util2d
  • util3d
  • util
  • view
  • voronoi
  • widget.base
  • widget.board
  • widget.book
  • widget.box
  • widget.button
  • widget.checkbox
  • widget.container
  • widget.edit
  • widget.gul
  • widget.hbox
  • widget.layout
  • widget
  • widget.menu
  • widget.mover
  • widget.panel
  • widget.scrollbar
  • widget.scrolling
  • widget.sizer
  • widget.slider
  • widget.spin
  • widget.text
  • widget.theme
  • widget.vbox
  • widget.widget_list
  • yaml.external
  • yaml.internal
  • yaml
  • yaml.xml

land.util2d

land_norm2d

Parameters: float x, float y

Returns: float

land_dot2d

Parameters: float ax, float ay, float bx, float by

Returns: float

Given two vectors ax/ay and bx/by, returns the dot product.

If the result is 0, the two vectors are orthogonal. If the result is
> 0, they point into the same general direction. If the result is < 0,
they point into opposite directions.

This can be geometrically interpreted as "how far one vector goes along the
direction of the other vector".

For example, if we have two vectors a = (4, -3) and b = (4, 0). Then:
|a| = 5
|b| = 4
a.b = 16
cos = a.b / |a| / |b| = 0.8 (36.87°)
length of a projected onto b: a.b / |b| = 4
length of b projected onto a: a.b / |a| = 3.2

land_cross2d

Parameters: float ax, float ay, float bx, float by

Returns: float

Given two vectors ax/ay and bx/by, returns the cross product.

If the result is 0, the two vectors are parallel. If the result
is > 0, b points more to the left than a (if y goes up). If the
result is < 0, b points more to the right than a (if y goes up).

Geometrically, this is "how far away does one vector go from the other".

For example, if we have two vectors a = (4, -3) and b = (4, 0). Then:
|a| = 5
|b| = 4
axb = 4 * 0 - -3 * 4 = 12
sin = axb / |a| / |b| = 0.6 (36.87°)
distance of a from b: axb / |b| = 3
distance of b from a: axb / |a| = 2.4

land_ortho2d

Parameters: float ax, float ay, float * bx, float * by

Returns a vector orthogonal to ax/ay. More specifically, returns a vector rotated 90 degree to the right (with y axis going down).

land_rotate2d

Parameters: LandFloat * x, LandFloat * y, LandFloat angle

Rotate x/y around 0/0 by angle in counter clockwise direction. cos(0) = 1, cos(45°) = 0.7, cos(90°) = 0 sin(0) = 0, sin(45°) = 0.7, sin(90°) = 1 0/1 -0.7/0.7 0.7/0.7 . . . . 0——1/0

land_line_line_collision2d

Parameters: LandFloat l1x1, LandFloat l1y1, LandFloat l1x2, LandFloat l1y2, LandFloat l2x1, LandFloat l2y1, LandFloat l2x2, LandFloat l2y2

Returns: bool

Checks if two line segments collide.

circle_circle_collision2d

Parameters: LandFloat c1x1, LandFloat c1y1, LandFloat c1r, LandFloat c2x1, LandFloat c2y1, LandFloat c2r

Returns: bool

land_line_circle_collision2d

Parameters: LandFloat lx1, LandFloat ly1, LandFloat lx2, LandFloat ly2, LandFloat cx1, LandFloat cy1, LandFloat cr

Returns: bool


Generated: Thu 27 Feb 2020 10:49:37 PM EST