Garry's Mod Wiki

OrderVectors

  OrderVectors( Vector vector1, Vector vector2 )

Description

Modifies the given vectors so that values of vector2 on each axis (X Y Z) are larger than those of vector1 by switching them around. Also known as ordering vectors.

This is useful to convert (or guarantee) 2 position vectors to a bounding box "mins" and "maxs" vectors.

Arguments

1 Vector vector1
Vector 1. This will become a "mins" vector of the resulting bounding box.
2 Vector vector2
Vector 2. This will become a "maxs" vector of the resulting bounding box.