Fix broken links in docs
This commit is contained in:
parent
4160970571
commit
02a6b99308
1 changed files with 8 additions and 6 deletions
|
@ -6,11 +6,12 @@ pub enum FloatRange {
|
||||||
/// The values are uniformly distributed between `min` and `max`.
|
/// The values are uniformly distributed between `min` and `max`.
|
||||||
Linear { min: f32, max: f32 },
|
Linear { min: f32, max: f32 },
|
||||||
/// The range is skewed by a factor. Values above 1.0 will make the end of the range wider,
|
/// The range is skewed by a factor. Values above 1.0 will make the end of the range wider,
|
||||||
/// while values between 0 and 1 will skew the range towards the start. Use [Range::skew_factor()]
|
/// while values between 0 and 1 will skew the range towards the start. Use
|
||||||
/// for a more intuitively way to calculate the skew factor where positive values skew the range
|
/// [FloatRange::skew_factor()] for a more intuitively way to calculate the skew factor where
|
||||||
/// towards the end while negative values skew the range toward the start.
|
/// positive values skew the range towards the end while negative values skew the range toward
|
||||||
|
/// the start.
|
||||||
Skewed { min: f32, max: f32, factor: f32 },
|
Skewed { min: f32, max: f32, factor: f32 },
|
||||||
/// The same as [Range::Skewed], but with the skewing happening from a central point. This
|
/// The same as [FloatRange::Skewed], but with the skewing happening from a central point. This
|
||||||
/// central point is rescaled to be at 50% of the parameter's range for convenience of use. Git
|
/// central point is rescaled to be at 50% of the parameter's range for convenience of use. Git
|
||||||
/// blame this comment to find a version that doesn't do this.
|
/// blame this comment to find a version that doesn't do this.
|
||||||
SymmetricalSkewed {
|
SymmetricalSkewed {
|
||||||
|
@ -43,8 +44,9 @@ impl Default for IntRange {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FloatRange {
|
impl FloatRange {
|
||||||
/// Calculate a skew factor for [Range::Skewed] and [Range::SymmetricalSkewed]. Positive values
|
/// Calculate a skew factor for [FloatRange::Skewed] and [FloatRange::SymmetricalSkewed].
|
||||||
/// make the end of the range wider while negative make the start of the range wider.
|
/// Positive values make the end of the range wider while negative make the start of the range
|
||||||
|
/// wider.
|
||||||
pub fn skew_factor(factor: f32) -> f32 {
|
pub fn skew_factor(factor: f32) -> f32 {
|
||||||
2.0f32.powf(factor)
|
2.0f32.powf(factor)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue