AV
Size: a a a
AV
AA
AV
AV
AV
AV
AA
AA
L.foldOver each ((,) <$> L.handles (_3._Just.to fromInteger) L.mean <*> L.handles _4 L.maximum) [(1,1,Just 1,1),(2,2,Nothing,2),(3,3,Just 3,3)]
(2.0,Just 3)
AA
AV
ЕТ
{-# INLINE gradientColour #-}
gradientColour :: Float -> Float -> RGBA Float
gradientColour gx gy =
{- Computes a colour depending on the local light direction -}
RGBA r g b 1.0
where
angle = atan2 gy gx
r = getR angle
g = getG angle
b = magnitude gx gy
{-# INLINE magnitude #-}
magnitude x y = sqrt (x * x + y * y)
{-# INLINE getR #-}
getR = (0.5 +) . (/ 2) . negate . sin
{-# I
AV
ЕТ
֍֎
{-# INLINE gradientColour #-}
gradientColour :: Float -> Float -> RGBA Float
gradientColour gx gy =
{- Computes a colour depending on the local light direction -}
RGBA r g b 1.0
where
angle = atan2 gy gx
r = getR angle
g = getG angle
b = magnitude gx gy
{-# INLINE magnitude #-}
magnitude x y = sqrt (x * x + y * y)
{-# INLINE getR #-}
getR = (0.5 +) . (/ 2) . negate . sin
{-# I
def gradientColour(gx, gy):
angle = atan2(gx, gy)
r = 0.5 + sin(angle) * -1 / 2
g = 0.5 + cos(angle) * -1 / 2
b = sqrt(gx * gx + gy * gy)
return rgba(r, g, b, 1.0)
ЕТ
def gradientColour(gx, gy):
angle = atan2(gx, gy)
r = 0.5 + sin(angle) * -1 / 2
g = 0.5 + cos(angle) * -1 / 2
b = sqrt(gx * gx + gy * gy)
return rgba(r, g, b, 1.0)
DI
VZ
VZ