@@ -1221,7 +1221,7 @@ function compute_thermal_structure(Temp, X, Y, Z, Phase, s::SpreadingRateTemp, s
1221
1221
Distance = perpendicular_distance_to_segment (px, py, x1, y1, x2, y2)
1222
1222
1223
1223
# Calculate thermal age
1224
- ThermalAge = abs (Distance * 1e3 * 1e2 ) / SpreadingVel + AgeRidge * 1e6 # Thermal age in years
1224
+ ThermalAge = abs (Distance * 1e5 ) / SpreadingVel + AgeRidge * 1e6 # Thermal age in years
1225
1225
if ThermalAge > maxAge * 1e6
1226
1226
ThermalAge = maxAge * 1e6
1227
1227
end
@@ -1251,11 +1251,7 @@ end
1251
1251
# Function to determine the side of a point with respect to a line (adjusted for segment direction)
1252
1252
function side_of_line (x, y, x1, y1, x2, y2, direction)
1253
1253
side = (x2 - x1) * (y - y1) - (y2 - y1) * (x - x1)
1254
- if direction == :left
1255
- return side > 0
1256
- else
1257
- return side < 0
1258
- end
1254
+ direction == :left ? side > 0 : side < 0
1259
1255
end
1260
1256
1261
1257
# Function to determine in which region a point lies (based on delimiters)
@@ -1265,11 +1261,7 @@ function determine_region(px, py, delimiters, segments)
1265
1261
x2, y2 = delimiters[i][2 ]
1266
1262
1267
1263
# Determine the direction of the segments
1268
- if x2 < x1
1269
- direction = :left # Shift left
1270
- else
1271
- direction = :right # Shift to the right
1272
- end
1264
+ direction = x2 < x1 ? :left : :right
1273
1265
1274
1266
# Check the side of the line considering the direction
1275
1267
if side_of_line (px, py, x1, y1, x2, y2, direction)
0 commit comments