Class KNumXEqualsAtan2YZ


  • public class KNumXEqualsAtan2YZ
    extends KConstraint
    This class creates a X = atan2(Y, Z) constraint.
    Atan2(Y, Z) is defined as follow :
    - atan(Y/Z) if Z > 0
    - atan(Y/Z) + PI if Z < 0 and Y >= 0
    - atan(Y/Z) - PI if Z < 0 and Y < 0
    - (+ PI / 2) if Z = 0 and Y > 0
    - (- PI / 2) if Z = 0 and Y < 0
    - undefined if Z = 0 and Y = 0

    Domain of X variable is at least (-PI, PI].

    Example :
    
    KFloatVar X(...);
    KFloatVar Y(...);
    KFloatVar Z(...);
    // ...
    problem.post(KNumXEqualsAtan2YZ(X, Y, Z));
    

    Since:
    2020.1
    See Also:
    KConstraint

    • Constructor Detail

      • KNumXEqualsAtan2YZ

        protected KNumXEqualsAtan2YZ​(long cPtr,
                                     boolean cMemoryOwn)
      • KNumXEqualsAtan2YZ

        public KNumXEqualsAtan2YZ​(KNumVar v1,
                                  KNumVar v2,
                                  KNumVar v3)
        Primary constructor of X = atan2(Y, Z)
        Parameters:
        v1 - the result variable
        v2 - the first atan2 argument variable
        v3 - the second atan2 argument variable
      • KNumXEqualsAtan2YZ

        public KNumXEqualsAtan2YZ​(KNumXEqualsAtan2YZ toCopy)
        Copy constructor