mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-12-21 23:08:49 -05:00
Update RCL
This commit is contained in:
parent
4fb88d3775
commit
d0b98840c1
11
raycastlib.h
11
raycastlib.h
@ -1731,13 +1731,14 @@ RCL_Unit RCL_perspectiveScaleVertical(RCL_Unit originalSize, RCL_Unit distance)
|
|||||||
RCL_Unit RCL_perspectiveScaleVerticalInverse(RCL_Unit originalSize,
|
RCL_Unit RCL_perspectiveScaleVerticalInverse(RCL_Unit originalSize,
|
||||||
RCL_Unit scaledSize)
|
RCL_Unit scaledSize)
|
||||||
{
|
{
|
||||||
// TODO: probably doesn't work
|
if (_RCL_fovCorrectionFactors[1] == 0)
|
||||||
|
_RCL_fovCorrectionFactors[1] = _RCL_fovCorrectionFactor(RCL_VERTICAL_FOV);
|
||||||
|
|
||||||
return scaledSize != 0 ?
|
return scaledSize != 0 ?
|
||||||
(originalSize * RCL_UNITS_PER_SQUARE + RCL_UNITS_PER_SQUARE / 2) /
|
|
||||||
// ^ take the middle
|
((originalSize * RCL_UNITS_PER_SQUARE) /
|
||||||
((RCL_VERTICAL_FOV_TAN * 2 * scaledSize) / RCL_UNITS_PER_SQUARE)
|
RCL_nonZero((_RCL_fovCorrectionFactors[1] * scaledSize)
|
||||||
: RCL_INFINITY;
|
/ RCL_UNITS_PER_SQUARE)) : RCL_INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
RCL_Unit
|
RCL_Unit
|
||||||
|
Loading…
Reference in New Issue
Block a user