[go: up one dir, main page]

[][src]Module egui::math

Vectors, positions, rectangles etc.

Structs

Pos2

A position on screen.

Rect

A rectangular region of space.

Vec2

A size or direction in 2D space.

Constants

TAU

The circumference of a circle divided by its radius.

Functions

clamp

Returns range.start() if x <= range.start(), returns range.end() if x >= range.end() and returns x elsewhen.

ease_in_ease_out

For t=[0,1], returns [0,1] with a derivate of zero at both ends

lerp

Linear interpolation.

pos2
remap

Linearly remap a value from one range to another, so that when x == from.start() returns to.start() and when x == from.end() returns to.end().

remap_clamp

Like remap, but also clamps the value so that the returned value is always in the to range.

round_to_precision

Round a value to the given number of decimal places.

vec2