Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
CIccOpDefPolarToCartesian Class Reference
+ Inheritance diagram for CIccOpDefPolarToCartesian:
+ Collaboration diagram for CIccOpDefPolarToCartesian:

Public Member Functions

virtual bool Exec (SIccCalcOp *op, SIccOpState &os)
 
- Public Member Functions inherited from IIccOpDef
virtual int ArgsPushed (CIccMpeCalculator *pCalc, SIccCalcOp &op)
 
virtual int ArgsUsed (CIccMpeCalculator *pCalc, SIccCalcOp &op)
 
virtual void Describe (SIccCalcOp &op, std::string &desc, int nVerboseness)
 
 IIccOpDef ()
 
virtual bool IsValid (CIccMpeCalculator *pCalc, SIccCalcOp &op)
 
virtual ~IIccOpDef ()
 

Detailed Description

Definition at line 1473 of file IccMpeCalc.cpp.

Member Function Documentation

◆ Exec()

virtual bool CIccOpDefPolarToCartesian::Exec ( SIccCalcOp * op,
SIccOpState & os )
inlinevirtual

Reimplemented from IIccOpDef.

Definition at line 1476 of file IccMpeCalc.cpp.

1477 {
1478 int j, n = op->data.select.v1+1;
1479 icFloatNumber a1, a2;
1480 int tn = n*2;
1481 size_t ss = os.pStack->size();
1482 if (tn>(int)ss)
1483 return false;
1484 icFloatNumber *s = &(*os.pStack)[ss-tn];
1485 for (j=0; j<n; j++) {
1486 a1 = s[j];
1487 a2 = s[j+n] * (icFloatNumber)icPiNum / 180.0f;
1488
1489 s[j] = a1 * (icFloatNumber)cos(a2);
1490 s[j+n] = a1 * (icFloatNumber)sin(a2);
1491 }
1492 return true;
1493 }
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100
#define icPiNum
Definition IccUtil.h:85
icUInt16Number v1
Definition IccMpeCalc.h:243
struct SIccCalcOp::@1::@2 select
union SIccCalcOp::@1 data
CIccFloatVector * pStack
Definition IccMpeCalc.h:275

References SIccCalcOp::data, icPiNum, SIccOpState::pStack, SIccCalcOp::select, and SIccCalcOp::v1.


The documentation for this class was generated from the following file: