public UpdatingVisualBounds(IBounds base_bounds, int current_left, int top_margin) { Left = base_bounds.Left + current_left; Top = base_bounds.Top + top_margin; Width = base_bounds.Width; Height = base_bounds.Height; }
public BendBounds(Bend b, Note n, IBounds n_bounds, VisualInfo v_info, IDelegate del) { bend = b; note = n; note_bounds = n_bounds; info = v_info; }
public async Task <IEnumerable <ForecastResponseDTO> > Calculate(IBounds bounds, RequestDTO request) { decimal wideLowerTotal = request.LumpSumInvestment; decimal wideUpperTotal = request.LumpSumInvestment; decimal narrowLowerTotal = request.LumpSumInvestment; decimal narrowUpperTotal = request.LumpSumInvestment; decimal runningTotal = request.LumpSumInvestment; decimal monthlyWideLowerRate = GetMonthlyRate(bounds.WideLowerBound); decimal monthlyWideUpperRate = GetMonthlyRate(bounds.WideUpperBound); decimal monthlyNarrowLowerRate = GetMonthlyRate(bounds.NarrowLowerBound); decimal monthlyNarrowUpperRate = GetMonthlyRate(bounds.NarrowUpperBound); var response = new List <ForecastResponseDTO>() { new ForecastResponseDTO(request.LumpSumInvestment) }; foreach (int year in Enumerable.Range(1, request.InvestmentTermInYears)) { wideLowerTotal = CalculateAnnualValue(monthlyWideLowerRate, wideLowerTotal, request); wideUpperTotal = CalculateAnnualValue(monthlyWideUpperRate, wideUpperTotal, request); narrowLowerTotal = CalculateAnnualValue(monthlyNarrowLowerRate, narrowLowerTotal, request); narrowUpperTotal = CalculateAnnualValue(monthlyNarrowUpperRate, narrowUpperTotal, request); runningTotal += request.MonthlyInvestment * 12; response.Add(new ForecastResponseDTO(year, runningTotal, wideLowerTotal, narrowLowerTotal, wideUpperTotal, narrowUpperTotal)); } return(await Task.FromResult(response)); }
public static Engine GetEngine( IEnumerable <IFighterStats> fighters, IBattlefield battlefield, IBounds bounds, ICollection <IEngineFeature> features, IMoveOrder moveOrder, IFighterPositionGenerator positionGenerator, IWinCondition winCondition, IStaleCondition staleCondition, int actionsPerRound) { return(new Engine( cfg => { cfg.ActionsPerRound = actionsPerRound; cfg.Battlefield = battlefield; cfg.Bounds = bounds; cfg.Features = features; cfg.MoveOrder = moveOrder; cfg.PositionGenerator = positionGenerator; cfg.WinCondition = winCondition; cfg.StaleCondition = staleCondition; return cfg; }, fighters)); }
public HOPOBounds(HOPO h, Note n, IBounds n_bounds, VisualInfo v_info, IDelegate del) { hopo = h; note = n; note_bounds = n_bounds; info = v_info; }
public TieBounds(Tie t, Note n, IBounds n_bounds, VisualInfo v_info, IDelegate del) { tie = t; note = n; note_bounds = n_bounds; info = v_info; }
public VibratoBounds(Vibrato v, Note n, IBounds n_bounds, VisualInfo v_info, IDelegate del) { vibrato = v; note = n; note_bounds = n_bounds; info = v_info; }
public SlideBounds(Slide s, Note n, IBounds n_bounds, VisualInfo v_info, IDelegate del) { slide = s; note = n; note_bounds = n_bounds; info = v_info; }
public void updateMeasureBounds(MeasureTreeNode measure_node) { IBounds bounds = measure_node?.Bounds.getBoundsList().FirstOrDefault(); position.resetPositionToMeasureBeginning(bounds); measure_node.updateBounds(); }
public PinchHarmonicBounds(PinchHarmonic ph, Note n, IBounds n_bounds, VisualInfo v_info, IDelegate del) { pinch_harmonic = ph; note = n; note_bounds = n_bounds; info = v_info; }
/// <summary> /// Get union of bounds /// </summary> /// <param name="bounds">Bounds</param> /// <returns>Union of bounds</returns> public void Merge(IBounds bounds) { if (bounds != null && bounds.Positions != null) { Merge(bounds.Positions); } }
public PalmMuteBounds(PalmMute pm, Note n, IBounds n_bounds, VisualInfo v_info, IDelegate del) { palm_mute = pm; note = n; note_bounds = n_bounds; info = v_info; }
private bool checkSameBar(IBounds bounds) { if (current_closest is null) { return(true); } return(current_closest.Bar < bounds.Bar || current_closest.Right <= bounds.Right); }
public override void checkItem(int pos, IBounds bounds) { if (checkChordBar(bounds)) { Position = pos + 1; current_closest = bounds; } }
public static void updateBeforeNoteEffectBounds(IBounds effect_bounds, IBounds note_bounds, Note note, VisualInfo info) { effect_bounds.Left = note_bounds.Left - info.Dimensions.NoteWidth; effect_bounds.Top = note_bounds.Top; effect_bounds.Width = info.Dimensions.NoteWidth; effect_bounds.Height = note_bounds.Height; effect_bounds.Bar = note_bounds.Bar; }
public HOPODrawingStrategy(HOPO h, IBounds bounds, VisualInfo v_info, IDelegate del) { Bounds = bounds; DrawDelegate = del; info = v_info; hopo = h; }
public BendDrawingStrategy(Bend b, IBounds bounds, VisualInfo v_info, IDelegate del) { Bounds = bounds; DrawDelegate = del; info = v_info; bend = b; }
public PalmMuteDrawingStrategy(PalmMute pm, IBounds bounds, VisualInfo v_info, IDelegate del) { Bounds = bounds; DrawDelegate = del; info = v_info; palm_mute = pm; }
public VibratoDrawingStrategy(Vibrato v, IBounds bounds, VisualInfo v_info, IDelegate del) { Bounds = bounds; DrawDelegate = del; info = v_info; vibrato = v; }
public SlideDrawingStrategy(Slide s, IBounds bounds, VisualInfo v_info, IDelegate del) { Bounds = bounds; DrawDelegate = del; info = v_info; slide = s; }
public TieDrawingStrategy(Tie t, IBounds bounds, VisualInfo v_info, IDelegate del) { Bounds = bounds; DrawDelegate = del; info = v_info; tie = t; }
public override void checkItem(int pos, IBounds bounds) { if (bounds.containsPoint(Point)) { MeasureSet = true; Position = pos; } }
public bool Includes( IBounds bounds ) { bool visible = false; foreach ( Plane plane in planes ) { if ( bounds.Intersects( plane ) != PlaneIntersectionType.Back ) { visible = true; break; } } return visible; }
/// <summary> /// Determine if bounding box is contained by frustum /// </summary> /// <param name="box">Bounding box</param> /// <returns>Containment type</returns> public ContainmentType Contains( IBounds bounds ) { bool flag = false; foreach ( Plane plane in planes ) { switch ( bounds.Intersects( plane ) ) { case PlaneIntersectionType.Back: return ContainmentType.Disjoint; case PlaneIntersectionType.Intersecting: { flag = true; break; } } } return !flag ? ContainmentType.Contains : ContainmentType.Intersects; }
/// <summary> /// Get union of bounds /// </summary> /// <param name="bounds">Bounds</param> /// <returns>Union of bounds</returns> public void Merge( IBounds bounds ) { if ( bounds != null && bounds.Positions != null ) Merge( bounds.Positions ); }