AGK for Pascal
ContentsIndexHome
PreviousUpNext
TAgk.RandomSign Method

Will randomly negate the value given and return it.

Syntax
Pascal
class function RandomSign(const Value: Integer): Integer; static;
Parameters 
Description 
const Value: Integer 
the value to change. 

Has a 50-50 chance of negating the value. The initial value can be negative, in which case it will randomly become positive.

Copyright (c) 2012. All rights reserved.