Package: graphene

Function graphene:rect-vertices

Lambda List

graphene:rect-vertices (rect vertices)

Arguments

rect -- a graphene:rect-t instance
vertices -- a list with 4 graphene:vec2-t instances

Return Value

The list with 4 graphene:vec2-t instances.

Details

Computes the four vertices of a rectangle.

Examples

(graphene:with-rect (rect 0 0 2 4)
  (graphene:with-vec2s (v1 v2 v3 v4)
    (mapcar #'graphene:vec2-to-float
            (graphene:rect-vertices rect (list v1 v2 v3 v4)))))
=> ((0.0 0.0) (2.0 0.0) (2.0 4.0) (0.0 4.0))    
 

See also

2025-3-8