Files
huangjingfen/pro_v3.5.1_副本/vendor/markbaker/complex
apple 434aa8c69d feat(fsgx): 完成全部24项开发任务 Phase1-7
Phase1 后端核心:
- 新增 fsgx_v1.sql 迁移脚本(is_queue_goods/frozen_points/available_points/no_assess)
- SystemConfigServices 返佣设置扩展(周期人数/分档比例/范围/时机)
- StoreOrderCreateServices 周期循环佣金计算
- StoreOrderTakeServices 佣金发放后同步冻结积分
- StoreProductServices/StoreProduct 保存 is_queue_goods

Phase2 后端接口:
- GET /api/hjf/brokerage/progress 佣金周期进度
- GET /api/hjf/assets/overview 资产总览
- HjfPointsServices 每日 frozen_points 0.4‰ 释放定时任务
- PUT /adminapi/hjf/member/{uid}/no_assess 不考核接口
- GET /adminapi/hjf/points/release_log 积分日志接口

Phase3 前端清理:
- hjfCustom.js 路由精简(仅保留 points/log)
- hjfQueue.js/hjfMember.js API 清理/重定向至 CRMEB 原生接口
- pages.json 公排→推荐佣金/佣金记录/佣金规则

Phase4-5 前端改造:
- queue/status.vue 推荐佣金进度页整体重写
- 商品详情/订单确认/支付结果页文案与逻辑改造
- 个人中心/资产页/引导页/规则页文案改造
- HjfQueueProgress/HjfRefundNotice/HjfAssetCard 组件改造
- 推广中心嵌入佣金进度摘要
- hjfMockData.js 全量更新(公排字段→佣金字段)

Phase6 Admin 增强:
- 用户列表新增 frozen_points/available_points 列及不考核操作按钮
- hjfPoints.js USE_MOCK=false 对接真实积分日志接口

Phase7 配置文档:
- docs/fsgx-phase7-config-checklist.md 后台配置与全链路验收清单

Made-with: Cursor
2026-03-23 22:32:19 +08:00
..

PHPComplex


PHP Class Library for working with Complex numbers

Build Status Total Downloads Latest Stable Version License

Complex Numbers


The library currently provides the following operations:

  • addition
  • subtraction
  • multiplication
  • division
    • division by
    • division into

together with functions for

  • theta (polar theta angle)
  • rho (polar distance/radius)
  • conjugate
  • negative
  • inverse (1 / complex)
  • cos (cosine)
  • acos (inverse cosine)
  • cosh (hyperbolic cosine)
  • acosh (inverse hyperbolic cosine)
  • sin (sine)
  • asin (inverse sine)
  • sinh (hyperbolic sine)
  • asinh (inverse hyperbolic sine)
  • sec (secant)
  • asec (inverse secant)
  • sech (hyperbolic secant)
  • asech (inverse hyperbolic secant)
  • csc (cosecant)
  • acsc (inverse cosecant)
  • csch (hyperbolic secant)
  • acsch (inverse hyperbolic secant)
  • tan (tangent)
  • atan (inverse tangent)
  • tanh (hyperbolic tangent)
  • atanh (inverse hyperbolic tangent)
  • cot (cotangent)
  • acot (inverse cotangent)
  • coth (hyperbolic cotangent)
  • acoth (inverse hyperbolic cotangent)
  • sqrt (square root)
  • exp (exponential)
  • ln (natural log)
  • log10 (base-10 log)
  • log2 (base-2 log)
  • pow (raised to the power of a real number)

Installation

composer require markbaker/complex:^1.0

Important BC Note

If you've previously been using procedural calls to functions and operations using this library, then from version 3.0 you should use MarkBaker/PHPComplexFunctions instead (available on packagist as markbaker/complex-functions).

You'll need to replace markbaker/complexin your composer.json file with the new library, but otherwise there should be no difference in the namespacing, or in the way that you have called the Complex functions in the past, so no actual code changes are required.

composer require markbaker/complex-functions:^3.0

You should not reference this library (markbaker/complex) in your composer.json, composer wil take care of that for you.

Usage

To create a new complex object, you can provide either the real, imaginary and suffix parts as individual values, or as an array of values passed passed to the constructor; or a string representing the value. e.g

$real = 1.23;
$imaginary = -4.56;
$suffix = 'i';

$complexObject = new Complex\Complex($real, $imaginary, $suffix);

or as an array

$real = 1.23;
$imaginary = -4.56;
$suffix = 'i';

$arguments = [$real, $imaginary, $suffix];

$complexObject = new Complex\Complex($arguments);

or as a string

$complexString = '1.23-4.56i';

$complexObject = new Complex\Complex($complexString);

Complex objects are immutable: whenever you call a method or pass a complex value to a function that returns a complex value, a new Complex object will be returned, and the original will remain unchanged. This also allows you to chain multiple methods as you would for a fluent interface (as long as they are methods that will return a Complex result).

Performing Mathematical Operations

To perform mathematical operations with Complex values, you can call the appropriate method against a complex value, passing other values as arguments

$complexString1 = '1.23-4.56i';
$complexString2 = '2.34+5.67i';

$complexObject = new Complex\Complex($complexString1);
echo $complexObject->add($complexString2);

or use the static Operation methods

$complexString1 = '1.23-4.56i';
$complexString2 = '2.34+5.67i';

echo Complex\Operations::add($complexString1, $complexString2);

If you want to perform the same operation against multiple values (e.g. to add three or more complex numbers), then you can pass multiple arguments to any of the operations.

You can pass these arguments as Complex objects, or as an array, or string that will parse to a complex object.

Using functions

When calling any of the available functions for a complex value, you can either call the relevant method for the Complex object

$complexString = '1.23-4.56i';

$complexObject = new Complex\Complex($complexString);
echo $complexObject->sinh();

or use the static Functions methods

$complexString = '1.23-4.56i';

echo Complex\Functions::sinh($complexString);

As with operations, you can pass these arguments as Complex objects, or as an array or string that will parse to a complex object.

In the case of the pow() function (the only implemented function that requires an additional argument) you need to pass both arguments when calling the function

$complexString = '1.23-4.56i';

$complexObject = new Complex\Complex($complexString);
echo Complex\Functions::pow($complexObject, 2);

or pass the additional argument when calling the method

$complexString = '1.23-4.56i';

$complexObject = new Complex\Complex($complexString);
echo $complexObject->pow(2);