Skip to content

Commit

Permalink
[CodeFactor] Apply fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
code-factor authored and tiagohm committed Oct 25, 2023
1 parent 61a8b29 commit 56c506c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions desktop/src/app/image/image.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ export class ImageComponent implements AfterViewInit, OnDestroy {

const { scale } = this.panZoom!.getTransform()

var x = parseFloat(target.getAttribute('data-x')) || 0
var y = parseFloat(target.getAttribute('data-y')) || 0
let x = parseFloat(target.getAttribute('data-x')) || 0
let y = parseFloat(target.getAttribute('data-y')) || 0

target.style.width = event.rect.width / scale + 'px'
target.style.height = event.rect.height / scale + 'px'
Expand Down
2 changes: 1 addition & 1 deletion desktop/src/shared/components/moon/moon.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class MoonComponent implements AfterViewInit, OnChanges {
for (let a = 0; a < 180; a++) {
const angle = (a - 90) * Math.PI / 180
let x1 = Math.ceil(Math.cos(angle) * cx)
let y1 = Math.ceil(Math.sin(angle) * cy)
const y1 = Math.ceil(Math.sin(angle) * cy)
const moonWidth = x1 * 2
let x2 = Math.floor(moonWidth * this.illuminationRatio)

Expand Down
8 changes: 4 additions & 4 deletions desktop/src/shared/utils/ephemeris.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ export function longitudeDegreesConstrained(deg: number) {
}

export function sphericalToRectangular(s: SphericalRepresentation): RectangularRepresentation {
let slon = Math.sin(s.lon)
let clon = Math.cos(s.lon)
let slat = Math.sin(s.lat)
let clat = Math.cos(s.lat)
const slon = Math.sin(s.lon)
const clon = Math.cos(s.lon)
const slat = Math.sin(s.lat)
const clat = Math.cos(s.lat)

return {
x: clon * clat,
Expand Down

0 comments on commit 56c506c

Please sign in to comment.