Skip to content
Contribute

void point::SetLen(int)

SetLen · point

Family: point

void point::SetLen(int)

Rescales the point's integer coordinates toward the requested vector length, modifying the point in place. Integer arithmetic and truncation can make the resulting length differ from the requested value.

The argument is the requested length. On the documented calculation path, each coordinate is multiplied by that value and divided with truncation toward zero. Products use 32-bit arithmetic. Behavior with a zero computed divisor, invalid references, or values that cause overflow is not fully documented.

Return type: void

The member is called on an object. Its receiver is not repeated among this signature’s arguments.

Position Type
1 int

Keep the notes and limitations when reusing this description. Do not infer undocumented parameter meanings, units or effects.

Suggest a better description

Write how you would explain this entry. Your proposal will be held in a private inbox for review.

0 / 4000

Proposals are not published automatically. Do not include personal information in your description.