Home

UnitDiagonal

UnitDiagonal is a term used in geometry to denote the diagonal of a unit-length square, and by extension the diagonal of a unit hypercube in higher dimensions. In the common 2D case, a square with side length 1 has a diagonal length d = sqrt(2). This result follows from the Pythagorean theorem: d^2 = 1^2 + 1^2, so d = sqrt(2) (approximately 1.4142).

Vector form: The diagonal runs from (0,0) to (1,1) and has the direction vector (1,1). The corresponding

Higher dimensions: In n dimensions, the diagonal length of a unit hypercube is sqrt(n). For a unit

Properties: The 2D UnitDiagonal is irrational; its square equals 2. It scales with the Euclidean norm and

Applications: UnitDiagonal appears in problems involving line length and distance calculations on grids, collision detection, and

See also: Diagonal, Euclidean norm, Pythagoras theorem, Unit vector.

unit
vector
along
the
diagonal
is
(1/√2,
1/√2).
cube
(n=3),
the
diagonal
is
sqrt(3).
is
often
used
to
measure
distance
along
diagonal
directions.
algorithms
that
require
normalized
diagonal
directions,
such
as
texture
mapping
and
bounding-box
computations.