class Ai4cr::Utils::Rand
- Ai4cr::Utils::Rand
- Reference
- Object
Defined in:
ai4cr/utils/rand.crConstant Summary
-
EXCLUDES_DEFAULT =
[0.0, 1.0]
-
MY_RAND =
Random.new((Time.utc.millisecond / 4).to_u64)
-
OFFSET_DEFAULT =
0.0
-
PROXIMITY_DEFAULT =
0.0001
-
SCALE_DEFAULT =
1.0
Class Method Summary
-
.rand_excluding(scale = SCALE_DEFAULT, offset = OFFSET_DEFAULT, excludes = EXCLUDES_DEFAULT, proximity = PROXIMITY_DEFAULT)
Ai4cr::Utils::Rand.rand_excluding (with defaults), aka: def self.rand_zero_to_one_no_zero -0.0..1.0 but no 0.0 and no 1.0
-
.rand_neg_half_to_pos_one_and_half_no_zero_no_one
Ai4cr::Utils::Rand.rand_neg_half_to_pos_one_and_half_no_zero_no_one -0.5..1.5 but no 0.0 and no 1.0
-
.rand_neg_one_to_pos_one_no_zero
Ai4cr::Utils::Rand.rand_neg_one_to_pos_one_no_zero -1.0..1.0 but no 0.0
- .rand_scaled_and_offset(scale = SCALE_DEFAULT, offset = OFFSET_DEFAULT)
Class Method Detail
def self.rand_excluding(scale = SCALE_DEFAULT, offset = OFFSET_DEFAULT, excludes = EXCLUDES_DEFAULT, proximity = PROXIMITY_DEFAULT)
#
Ai4cr::Utils::Rand.rand_excluding (with defaults), aka: def self.rand_zero_to_one_no_zero -0.0..1.0 but no 0.0 and no 1.0
def self.rand_neg_half_to_pos_one_and_half_no_zero_no_one
#
Ai4cr::Utils::Rand.rand_neg_half_to_pos_one_and_half_no_zero_no_one -0.5..1.5 but no 0.0 and no 1.0
def self.rand_neg_one_to_pos_one_no_zero
#
Ai4cr::Utils::Rand.rand_neg_one_to_pos_one_no_zero -1.0..1.0 but no 0.0