91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 3KB
    文件類型: .cpp
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-05-28
  • 語言: C/C++
  • 標簽: unwrap??C++??

資源簡介

Unwrap by changing deltas between values to 2*pi complement. Unwrap radian phase phase by changing absolute jumps greater than discont to their 2*pi complement along the given axis.

資源截圖

代碼片段和文件信息

//
//??unwrap.cpp
//
//??Copyright???2017?Z.?Nan.?All?rights?reserved.
//

#?include?
#?include?
#?include?

#?define?PI?3.14159265358979323846

using?namespace?std;


double?mod(double?a?double?b)?{
????/*
?????Return?remainder?of?division.
?????
?????:param?a:?dividend
?????:param?b:?divisor
?????:return?remains:?remainder?of?the?quotient?floor_divide(a?b)
?????*/
????
????int?quotients;
????double?remains;
????
????if?(a?>=?0?&&?b?>?0)?{
????????if?(a?????????????remains?=?a;
????????}
????????else?if?(a?==?b)?{
????????????remains?=?0;
????????}
????????else?{
????????????quotients?=?(int)?(a/b);
????????????remains?=?a?-?b?*?quotients;
????????}
????}
????else?if?(a?<=?0?&&?b?????????remains?=?mod(-a?-b);
????????remains?=?-remains;
????}
????else?if?(a?<=?0?&&?b?>?0)?{
????????remains?=?mod(-a?b);
????????remains?=?b?-?remains;
????}
????else?if?(a?>=?0?&&?b?????????remains?=?mod(-a?-b);
????????remains?=?-remains;
????}
????else?{
????????cout?<????????exit(0);
????}
????
????return?remains;
}

void?unwrap(vector?&?phase?vector?&?unwrapped_phase)?{
????/*
?????Unwrap?by?changing?deltas?between?values?to?2?*?pi?complement.
?????
?????Unwrap?radian?phase?phase?by?changing?absolute?jumps?greater?than?discont?to?their?2?*?pi?complement?along?the?given?axis.
?????
?????:param?phase:?input?array
?????:return?unwrap

評論

共有 條評論