Skip to content

Commit

Permalink
Use string.EndsWith(string, StringComparison.
Browse files Browse the repository at this point in the history
  • Loading branch information
claunia committed Oct 5, 2023
1 parent 6a86aea commit 6591036
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions Aaru.Core/Graphics/Spiral.cs
Original file line number Diff line number Diff line change
Expand Up @@ -620,11 +620,11 @@ public void PaintLeadInSector(ulong sector, SKColor color, int leadInSize)
/// <param name="center">Center of the spiral start</param>
/// <param name="minRadius">Minimum radius before which the spiral must have no points</param>
/// <param name="maxRadius">Radius at which the spiral will end</param>
/// <param name="a">TODO: Something trigonometry something something...</param>
/// <param name="a">A constant that decides the position of a point on the spiral</param>
/// <returns>List of points to draw the specified spiral</returns>
static List<SKPoint> GetSpiralPoints(SKPoint center, float minRadius, float maxRadius, float a)
{
// Get the points.
// Initialize a list to store the points of the spiral.
List<SKPoint> points = new();
const float dtheta = (float)(0.5f * Math.PI / 180);

Expand All @@ -636,18 +636,18 @@ static List<SKPoint> GetSpiralPoints(SKPoint center, float minRadius, float maxR
if(r < minRadius)
continue;

// Convert to Cartesian coordinates.
// Converts polar coordinates (r,theta) to Cartesian (x,y)
var x = (float)(r * Math.Cos(theta));
var y = (float)(r * Math.Sin(theta));

// Center.
// Adjusts x and y by center coordinates
x += center.X;
y += center.Y;

// Create the point.
// Adds the newly calculated point to the list
points.Add(new SKPoint(x, y));

// If we have gone far enough, stop.
// Terminate the loop if we have reached the end of the spiral
if(r > maxRadius)
break;
}
Expand Down
2 changes: 1 addition & 1 deletion Aaru.Decoders
2 changes: 1 addition & 1 deletion Aaru.Decryption
Submodule Aaru.Decryption updated 1 files
+1 −1 DVD/CSS.cs

0 comments on commit 6591036

Please sign in to comment.