TModLoader
v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches
◆
IntersectsConeFastInaccurate()
static bool Terraria.Utils.IntersectsConeFastInaccurate
(
this
Rectangle
targetRect
,
Vector2
coneCenter
,
float
coneLength
,
float
coneRotation
,
float
maximumAngle
)
inline
static
Definition at line
1365
of file
Utils.cs
.
1366
{
1367
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
1368
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
1369
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
1370
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
1371
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
1372
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
1373
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
1374
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
1375
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
1376
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
1377
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
1378
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
1379
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
1380
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
1381
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
1382
Vector2 point =
coneCenter
+
coneRotation
.ToRotationVector2() *
coneLength
;
1383
Vector2
spinningpoint
= targetRect.ClosestPointInRect(point) -
coneCenter
;
1384
float
num
=
spinningpoint
.RotatedBy(0
f
-
coneRotation
).ToRotation();
1385
if
(
num < 0f - maximumAngle || num >
maximumAngle
)
1386
{
1387
return
false
;
1388
}
1389
return
((Vector2)(
ref
spinningpoint
)).Length() <
coneLength
;
1390
}
List
Terraria
Utils
Generated by
1.10.0