VRange class

(en)A class that defines a range of values and makes it convenient to use.

(ja)一定の値の範囲を定義し、便利に利用できるようにするためのクラスです。

Author Masahide Mori

First edition creation date 2023-09-10 14:31:24

Constructors

VRange({required double min, required double max})
  • min : The minimum value.
  • max : The maximum value.
  • const

    Properties

    hashCode → int
    The hash code for this object.
    no setterinherited
    max → double
    final
    min → double
    final
    runtimeType → Type
    A representation of the runtime type of the object.
    no setterinherited

    Methods

    generateDoubleList(int step) → List<double>
    (en) Creates a list within this range with specified steps. The returned value has min rounded to ceil and max to floor.
    generateDoubleStepDoubleList(double step, bool isContainsMax) → List<double>
    (en) Creates a list within this range with specified steps.
    generateList(int step) → List<int>
    (en) Creates a list within this range with specified steps. The returned value has min rounded to ceil and max to floor.
    getCenterValue() → double
    (en) Returns the middle value of the defined range.
    getRandomInRange() → double
    (en) Returns a random value within a defined range.
    isInRange(double v) → bool
    (en) Returns true if the specified value is within this range.
    isOverlapping(VRange other) → bool
    (en) Returns true if the specified range even partially overlaps this range.
    noSuchMethod(Invocation invocation) → dynamic
    Invoked when a nonexistent method or property is accessed.
    inherited
    toString() → String
    A string representation of this object.
    inherited

    Operators

    operator ==(Object other) → bool
    The equality operator.
    inherited