Skip to content

[css-values] Make 'hypot()' n-dimensional #3765

@Loirooriol

Description

@Loirooriol

From https://drafts.csswg.org/css-values-4/#funcdef-hypot,

The hypot(A,B) function contains two comma-separated calculations A and B, and returns the length of the hypotenuse of a right-angled triangle with legs equal to A and B.

I would like to generalize this to the euclidean norm like in JS Math.hypot. Then

  • hypot(A) would be the absolute value of A
  • hypot(A, B) would be the hypotenuse of a right-angled triangle with legs equal to A and B.
  • hypot(A, B, C) would be the length of the space diagonal of a rectangular cuboid with edge lengths A, B and C.
  • and possibly more (though maybe not as useful as the previous cases).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions