Skip to content

Commit 8dd45f7

Browse files
committed
Improve the documentation of Transform3D::perspective.
1 parent 2894075 commit 8dd45f7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/transform3d.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,14 +425,16 @@ where
425425
)
426426
}
427427

428-
/// Create a simple perspective projection transform:
428+
/// Create a simple perspective transform, projecting to the plane `z = -d`.
429429
///
430430
/// ```text
431431
/// 1 0 0 0
432432
/// 0 1 0 0
433433
/// 0 0 1 -1/d
434434
/// 0 0 0 1
435435
/// ```
436+
///
437+
/// See <https://drafts.csswg.org/css-transforms-2/#PerspectiveDefined>.
436438
pub fn perspective(d: T) -> Self
437439
where
438440
T: Neg<Output = T> + Div<Output = T>,

0 commit comments

Comments
 (0)