view test/classdef/foo_static_method_constant_property.m @ 31210:9ad55d2e1bbf stable

Make sure we don't pass short 8.3 path to latex on Windows (bug #62779). * latex-text-renderer.cc (latex_renderer::write_tex_file): On Windows, use canonicalized path of temporary directory.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Sun, 28 Aug 2022 22:44:49 +0200
parents e9a0469dedd9
children
line wrap: on
line source

classdef foo_static_method_constant_property
  properties
    frequency;
  end
  properties (Constant = true)
    pie = pi;
  end
  methods
    function obj = foo_static_method_constant_property (f)
      if (nargin == 1)
        obj.frequency = f;
      elseif (nargin ~= 0)
        error ('foo_static_method_constant_property:SyntaxError', ...
               'foo_static_method_constant_property: Invalid syntax')
      end
    end
    function res = cosine (obj, t)
      res = cos (obj.radians_per_cycle () * obj.frequency * t);
    end
    function res = sine (obj, t)
      res = sin (obj.radians_per_cycle () * obj.frequency * t);
    end
  end
  methods (Static)
    function res = radians_per_cycle ()
      res = 2 * foo_static_method_constant_property.pie;
    end
  end
end