- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
int ConditionsTuple(const bool Condition1, const bool Condition2)
{
return (Condition1<<1) + Condition2;
}
template <bool Condition1, bool Condition2>
struct TConditionsTuple
{
enum {Result = (Condition1<<1) + Condition2};
};
float SignedIf(const bool Condition)
{
return Condition ? -1 : 1;
}
switch (ConditionsTuple(
bExpr1,
bExpr2
))
{
case TConditionsTuple<1, 1>::Result:
return PArc(new TArc(
CouplePointAtPrimitive1,
CouplePointAtPrimitive2,
ArcCoupleCenter,
Abs(arcCoupleRadius)
));
case TConditionsTuple<0, 1>::Result:
throw TPrimitive1HalfLengthExpiredException();
case TConditionsTuple<1, 0>::Result:
throw TPrimitive2HalfLengthExpiredException();
case TConditionsTuple<0, 0>::Result:
throw TAllPrimitivesHalfLengthExpiredException();
}
Говногость 04.06.2012 18:48 # 0
rat4 04.06.2012 19:53 # 0
bormand 04.06.2012 19:58 # +1
Copy-Paste 04.06.2012 20:01 # −10
bormand 04.06.2012 20:07 # −1
Copy-Paste 04.06.2012 20:09 # −9
ReallyBugMeNot 04.06.2012 21:27 # +6
lucidfoxGovno 04.06.2012 21:27 # −6
A_P_Suslikov 25.08.2021 00:54 # 0