Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.

IntRange.cs

Description du code

IntRange.cs est un fichier du projet PhotoBrol.
Ce fichier est situé dans /var/www/bin/sniplets/bibliobrol/photobrol/.

Projet PhotoBrol :

Editeur d'images en CSharp.

Code source ou contenu du fichier

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace be.gaudry.model.math
  6. {
  7. /// <summary>
  8. /// Represents an integer range with minimum and maximum values
  9. /// </summary>
  10. public class IntRange
  11. {
  12. private int min, max;
  13.  
  14. /// <summary>
  15. /// Minimum value
  16. /// </summary>
  17. public int Min
  18. {
  19. get { return min; }
  20. set { min = value; }
  21. }
  22.  
  23. /// <summary>
  24. /// Maximum value
  25. /// </summary>
  26. public int Max
  27. {
  28. get { return max; }
  29. set { max = value; }
  30. }
  31.  
  32. /// <summary>
  33. /// Length of the range (difference between maximum and minimum values)
  34. /// </summary>
  35. public int Length
  36. {
  37. get { return max - min; }
  38. }
  39.  
  40. /// <summary>
  41. /// Initializes a new instance of the <see cref="IntRange"/> class
  42. /// </summary>
  43. ///
  44. /// <param name="min">Minimum value of the range</param>
  45. /// <param name="max">Maximum value of the range</param>
  46. public IntRange(int min, int max)
  47. {
  48. this.min = min;
  49. this.max = max;
  50. }
  51.  
  52. /// <summary>
  53. /// Check if the specified value is inside this range
  54. /// </summary>
  55. ///
  56. /// <param name="x">Value to check</param>
  57. ///
  58. /// <returns><b>True</b> if the specified value is inside this range or
  59. /// <b>false</b> otherwise.</returns>
  60. ///
  61. public bool IsInside(int x)
  62. {
  63. return ((x >= min) && (x <= max));
  64. }
  65.  
  66. /// <summary>
  67. /// Check if the specified range is inside this range
  68. /// </summary>
  69. ///
  70. /// <param name="range">Range to check</param>
  71. ///
  72. /// <returns><b>True</b> if the specified range is inside this range or
  73. /// <b>false</b> otherwise.</returns>
  74. ///
  75. public bool IsInside(IntRange range)
  76. {
  77. return ((IsInside(range.min)) && (IsInside(range.max)));
  78. }
  79.  
  80. /// <summary>
  81. /// Check if the specified range overlaps with this range
  82. /// </summary>
  83. ///
  84. /// <param name="range">Range to check for overlapping</param>
  85. ///
  86. /// <returns><b>True</b> if the specified range overlaps with this range or
  87. /// <b>false</b> otherwise.</returns>
  88. ///
  89. public bool IsOverlapping(IntRange range)
  90. {
  91. return ((IsInside(range.min)) || (IsInside(range.max)));
  92. }
  93. }
  94. }

Structure et Fichiers du projet

Afficher/masquer...


Répertoires contenus dans /var/www/bin/sniplets/bibliobrol/photobrol/model/math/ 
IcôneNomTailleModification
Pas de sous-répertoires.
IcôneNomTailleModification
| _ Répertoire parent0 octets1716449397 23/05/2024 09:29:57
Fichiers contenus dans /var/www/bin/sniplets/bibliobrol/photobrol/model/math/ 
IcôneNomTailleModificationAction
IcôneNomTailleModificationAction
Afficher le fichier .cs|.csStatistics.cs6.11 Ko31/10/2018 18:32:51-refusé-
Afficher le fichier .cs|.csIntRange.cs2.64 Ko31/10/2018 18:32:51-refusé-
Afficher le fichier .cs|.csHistogram.cs2.96 Ko31/10/2018 18:32:51-refusé-

Utilisation de l'explorateur de code

  • Navigation :
    • Un clic sur une icône de répertoire ouvre ce répertoire pour en afficher les fichiers.
    • Lorsque le répertoire en cours ne contient pas de sous-répertoires il est possible de remonter vers le répertoire parent.
    • La structure de répertoires en treetable (tableau en forme d'arborescence) n'est plus possibledans cette version.
    • Un clic sur une icône de fichier ouvre ce fichier pour en afficher le code avec la coloration syntaxique adaptée en fonction du langage principal utilisé dans le fichier.
  • Affichage :
    • Il est possible de trier les répertoires ou les fichiers selon certains critères (nom, taille, date).
  • Actions :
    • Les actions possible sur les fichiers dépendent de vos droits d'utilisateur sur le site. Veuillez activer le mode utilisateur pour activer les actions.

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 30/10/2009 gemaakt, de laatste keer de 26/10/2018 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/cs-photobrol-source-rf-model/math/IntRange.cs.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.