Same for Scalar
This commit is contained in:
parent
9544bb584a
commit
1129acc542
@ -50,8 +50,6 @@ pub inline fn toRhsScalar(comptime BaseT: type, rhs: anytype) rhsScalarType(Base
|
|||||||
/// All dimension and unit tracking is resolved at comptime — zero runtime overhead.
|
/// All dimension and unit tracking is resolved at comptime — zero runtime overhead.
|
||||||
pub fn Scalar(comptime T: type, comptime d_opt: Dimensions.ArgOpts, comptime s_opt: Scales.ArgOpts) type {
|
pub fn Scalar(comptime T: type, comptime d_opt: Dimensions.ArgOpts, comptime s_opt: Scales.ArgOpts) type {
|
||||||
@setEvalBranchQuota(10_000_000);
|
@setEvalBranchQuota(10_000_000);
|
||||||
const d = Dimensions.init(d_opt);
|
|
||||||
const s = Scales.init(s_opt);
|
|
||||||
return struct {
|
return struct {
|
||||||
value: T,
|
value: T,
|
||||||
|
|
||||||
@ -62,12 +60,8 @@ pub fn Scalar(comptime T: type, comptime d_opt: Dimensions.ArgOpts, comptime s_o
|
|||||||
|
|
||||||
/// Type of underline value, mostly use for Vector
|
/// Type of underline value, mostly use for Vector
|
||||||
pub const ValueType: type = T;
|
pub const ValueType: type = T;
|
||||||
|
pub const dims: Dimensions = Dimensions.init(d_opt);
|
||||||
/// Dimensions of this type
|
pub const scales = Scales.init(s_opt);
|
||||||
pub const dims: Dimensions = d;
|
|
||||||
|
|
||||||
/// Scales of this type
|
|
||||||
pub const scales = s;
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
// Internal: resolved-rhs shorthands
|
// Internal: resolved-rhs shorthands
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user