Example #1
0
        // Memoizing constructor
        public static ModalRangeStrategy Create(double min, double max)
        {
            // TODO: This method may require synchronisation for the static instances
            Pair <double, double> key = new Pair <double, double>(min, max);

            if (instances.ContainsKey(key))
            {
                return(instances[key]);
            }
            ModalRangeStrategy instance = new ModalRangeStrategy(min, max);

            instances.Add(key, instance);
            return(instance);
        }
Example #2
0
 private AbstractRangeStrategy PhiRangeStrategy(Grid2DDomain domain)
 {
     return(ModalRangeStrategy.Create(-tipTangentAngle, tipTangentAngle));
 }
Example #3
0
 private AbstractRangeStrategy ThetaRangeStrategy(Grid2DDomain domain)
 {
     return(ModalRangeStrategy.Create(0.0, 360.0));
 }